aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--bfd/ChangeLog14
-rw-r--r--bfd/Makefile.am17
-rw-r--r--bfd/Makefile.in17
-rw-r--r--bfd/archures.c5
-rw-r--r--bfd/bfd-in2.h54
-rw-r--r--bfd/config.bfd10
-rwxr-xr-xbfd/configure27
-rw-r--r--bfd/configure.in3
-rw-r--r--bfd/cpu-s390.c56
-rw-r--r--bfd/elf.c3
-rw-r--r--bfd/elf32-s390.c2179
-rw-r--r--bfd/elf64-s390.c2178
-rw-r--r--bfd/libbfd.h17
-rw-r--r--bfd/po/POTFILES.in3
-rw-r--r--bfd/po/bfd.pot59
-rw-r--r--bfd/reloc.c69
-rw-r--r--bfd/targets.c7
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/po/binutils.pot640
-rw-r--r--binutils/readelf.c7
-rwxr-xr-xconfig.guess2
-rwxr-xr-xconfig.sub2
-rw-r--r--config/ChangeLog7
-rw-r--r--config/mh-s390pic1
-rw-r--r--config/mt-s390pic1
-rw-r--r--configure.in3
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/Makefile.am15
-rw-r--r--gas/Makefile.in18
-rw-r--r--gas/config.in6
-rw-r--r--gas/config/tc-s390.c1756
-rw-r--r--gas/config/tc-s390.h113
-rwxr-xr-xgas/configure352
-rw-r--r--gas/configure.in11
-rw-r--r--gas/po/POTFILES.in2
-rw-r--r--gas/po/gas.pot1196
-rw-r--r--include/ChangeLog4
-rw-r--r--include/dis-asm.h1
-rw-r--r--include/elf/ChangeLog5
-rw-r--r--include/elf/common.h4
-rw-r--r--include/elf/s390.h73
-rw-r--r--include/opcode/ChangeLog4
-rw-r--r--include/opcode/s390.h130
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/Makefile.am8
-rw-r--r--ld/Makefile.in10
-rw-r--r--ld/configure.host10
-rw-r--r--ld/configure.tgt2
-rw-r--r--ld/emulparams/elf64_s390.sh11
-rw-r--r--ld/emulparams/elf_s390.sh10
-rw-r--r--ld/po/ld.pot403
-rw-r--r--opcodes/ChangeLog11
-rw-r--r--opcodes/Makefile.am8
-rw-r--r--opcodes/Makefile.in8
-rwxr-xr-xopcodes/configure3
-rw-r--r--opcodes/configure.in3
-rw-r--r--opcodes/disassemble.c6
-rw-r--r--opcodes/po/POTFILES.in2
-rw-r--r--opcodes/po/opcodes.pot4
-rw-r--r--opcodes/s390-dis.c231
-rw-r--r--opcodes/s390-mkopc.c172
-rw-r--r--opcodes/s390-opc.c969
-rw-r--r--opcodes/s390-opc.txt601
64 files changed, 10286 insertions, 1283 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a63a64..f75ae2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config.guess: Add linux target for S/390.
+ * config.sub: Likewise.
+ * configure.in: Likewise.
+
2001-02-06 Ben Elliston <bje@redhat.com>
* configure: Output host type to stdout, not stderr.
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 082c643..9669fd4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,17 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * archures.c: Likewise.
+ * bfd-in2.h: Likewise.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * elf.c: Likewise.
+ * libbfd.h: Likewise.
+ * targets.c: Likewise.
+ * cpu-s390.c: New file.
+ * elf32-s390.c: New file.
+ * elf64-s390.c: New file.
+
2001-02-09 Nick Clifton <nickc@redhat.com>
* peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 9a60ee6..821fab1 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -72,6 +72,7 @@ ALL_MACHINES = \
cpu-pj.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
+ cpu-s390.lo \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
@@ -114,6 +115,7 @@ ALL_MACHINES_CFILES = \
cpu-pj.c \
cpu-powerpc.c \
cpu-rs6000.c \
+ cpu-s390.c \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
@@ -199,6 +201,7 @@ BFD32_BACKENDS = \
elf32-mips.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-sparc.lo \
@@ -336,6 +339,7 @@ BFD32_BACKENDS_CFILES = \
elf32-mips.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
elf32-sparc.c \
@@ -417,6 +421,7 @@ BFD64_BACKENDS = \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
+ elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
nlm32-alpha.lo \
@@ -433,6 +438,7 @@ BFD64_BACKENDS_CFILES = \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
+ elf64-s390.c \
elf64-sparc.c \
elf64.c \
nlm32-alpha.c \
@@ -767,6 +773,7 @@ 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-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
@@ -1025,6 +1032,11 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/s390.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 \
@@ -1269,6 +1281,11 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
ecoffswap.h elf64-target.h
+elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/s390.h \
+ $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 0b5f886..808fb72 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -193,6 +193,7 @@ ALL_MACHINES = \
cpu-pj.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
+ cpu-s390.lo \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
@@ -236,6 +237,7 @@ ALL_MACHINES_CFILES = \
cpu-pj.c \
cpu-powerpc.c \
cpu-rs6000.c \
+ cpu-s390.c \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
@@ -322,6 +324,7 @@ BFD32_BACKENDS = \
elf32-mips.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
elf32-sparc.lo \
@@ -460,6 +463,7 @@ BFD32_BACKENDS_CFILES = \
elf32-mips.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
elf32-sparc.c \
@@ -542,6 +546,7 @@ BFD64_BACKENDS = \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
+ elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
nlm32-alpha.lo \
@@ -559,6 +564,7 @@ BFD64_BACKENDS_CFILES = \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
+ elf64-s390.c \
elf64-sparc.c \
elf64.c \
nlm32-alpha.c \
@@ -1306,6 +1312,7 @@ 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-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
@@ -1564,6 +1571,11 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/s390.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 \
@@ -1808,6 +1820,11 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
ecoffswap.h elf64-target.h
+elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/s390.h \
+ $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
diff --git a/bfd/archures.c b/bfd/archures.c
index 84b7744..b15de52 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -248,6 +248,9 @@ DESCRIPTION
.#define bfd_mach_avr4 4
.#define bfd_mach_avr5 5
. bfd_arch_cris, {* Axis CRIS *}
+. bfd_arch_s390, {* IBM s390 *}
+.#define bfd_mach_s390_esa 0
+.#define bfd_mach_s390_esame 1
. bfd_arch_last
. };
*/
@@ -323,6 +326,7 @@ extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
+extern const bfd_arch_info_type bfd_s390_arch;
static const bfd_arch_info_type * const bfd_archures_list[] = {
#ifdef SELECT_ARCHITECTURES
@@ -367,6 +371,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
&bfd_mcore_arch,
&bfd_avr_arch,
&bfd_ia64_arch,
+ &bfd_s390_arch,
#endif
0
};
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index b8e864b..db4576d 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1517,6 +1517,9 @@ enum bfd_architecture
#define bfd_mach_avr4 4
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
+ bfd_arch_s390, /* IBM s390 */
+#define bfd_mach_s390_esa 0
+#define bfd_mach_s390_esame 1
bfd_arch_last
};
@@ -2515,6 +2518,57 @@ value of SUBI insn. */
into 22 bits. */
BFD_RELOC_AVR_CALL,
+/* Direct 12 bit. */
+ BFD_RELOC_390_12,
+
+/* 12 bit GOT offset. */
+ BFD_RELOC_390_GOT12,
+
+/* 32 bit PC relative PLT address. */
+ BFD_RELOC_390_PLT32,
+
+/* Copy symbol at runtime. */
+ BFD_RELOC_390_COPY,
+
+/* Create GOT entry. */
+ BFD_RELOC_390_GLOB_DAT,
+
+/* Create PLT entry. */
+ BFD_RELOC_390_JMP_SLOT,
+
+/* Adjust by program base. */
+ BFD_RELOC_390_RELATIVE,
+
+/* 32 bit PC relative offset to GOT. */
+ BFD_RELOC_390_GOTPC,
+
+/* 16 bit GOT offset. */
+ BFD_RELOC_390_GOT16,
+
+/* PC relative 16 bit shifted by 1. */
+ BFD_RELOC_390_PC16DBL,
+
+/* 16 bit PC rel. PLT shifted by 1. */
+ BFD_RELOC_390_PLT16DBL,
+
+/* PC relative 32 bit shifted by 1. */
+ BFD_RELOC_390_PC32DBL,
+
+/* 32 bit PC rel. PLT shifted by 1. */
+ BFD_RELOC_390_PLT32DBL,
+
+/* 32 bit PC rel. GOT shifted by 1. */
+ BFD_RELOC_390_GOTPCDBL,
+
+/* 64 bit GOT offset. */
+ BFD_RELOC_390_GOT64,
+
+/* 64 bit PC relative PLT address. */
+ BFD_RELOC_390_PLT64,
+
+/* 32 bit rel. offset to GOT entry. */
+ BFD_RELOC_390_GOTENT,
+
/* These two relocations are used by the linker to determine which of
the entries in a C++ virtual function table are actually used. When
the --gc-sections option is given, the linker will zero out the entries
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 580c82d..f45e839 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -46,6 +46,7 @@ m88*) targ_archs=bfd_m88k_arch ;;
mips*) targ_archs=bfd_mips_arch ;;
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+s390*) targ_archs=bfd_s390_arch ;;
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
sparc*) targ_archs=bfd_sparc_arch ;;
v850*) targ_archs=bfd_v850_arch ;;
@@ -718,6 +719,15 @@ case "${targ}" in
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
;;
+ s390-*-linux*)
+ targ_defvec=bfd_elf32_s390_vec
+ ;;
+#ifdef BFD64
+ s390x-*-linux*)
+ targ_defvec=bfd_elf64_s390_vec
+ ;;
+#endif
+
sh-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
diff --git a/bfd/configure b/bfd/configure
index d65a378..35bb8a1 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -5982,6 +5982,7 @@ do
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_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" ;;
@@ -5994,6 +5995,8 @@ do
target64=true ;;
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
+ bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"
+ target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
@@ -6179,17 +6182,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:6183: checking for $ac_hdr" >&5
+echo "configure:6186: 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 6188 "configure"
+#line 6191 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6196: \"$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*
@@ -6218,12 +6221,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6222: checking for $ac_func" >&5
+echo "configure:6225: 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 6227 "configure"
+#line 6230 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6246,7 +6249,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6253: \"$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
@@ -6271,7 +6274,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6275: checking for working mmap" >&5
+echo "configure:6278: 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
@@ -6279,7 +6282,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6283 "configure"
+#line 6286 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6419,7 +6422,7 @@ main()
}
EOF
-if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6426: \"$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
@@ -6444,12 +6447,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6448: checking for $ac_func" >&5
+echo "configure:6451: 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 6453 "configure"
+#line 6456 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6472,7 +6475,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6479: \"$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
diff --git a/bfd/configure.in b/bfd/configure.in
index d643b97..a65cb91 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -531,6 +531,7 @@ do
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_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" ;;
@@ -543,6 +544,8 @@ do
target64=true ;;
bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
target64=true ;;
+ bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"
+ target64=true ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
target64=true ;;
cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
diff --git a/bfd/cpu-s390.c b/bfd/cpu-s390.c
new file mode 100644
index 0000000..15eb9a5
--- /dev/null
+++ b/bfd/cpu-s390.c
@@ -0,0 +1,56 @@
+/* BFD support for the s390 processor.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Carl B. Pedersen and Martin Schwidefsky.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+
+const bfd_arch_info_type bfd_s390_esame_arch =
+{
+ 64, /* bits in a word */
+ 64, /* bits in an address */
+ 8, /* bits in a byte */
+ bfd_arch_s390,
+ bfd_mach_s390_esame,
+ "s390",
+ "s390:esame",
+ 3, /* section alignment power */
+ true, /* the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ NULL
+};
+
+const bfd_arch_info_type bfd_s390_arch =
+{
+ 32, /* bits in a word */
+ 32, /* bits in an address */
+ 8, /* bits in a byte */
+ bfd_arch_s390,
+ bfd_mach_s390_esa,
+ "s390",
+ "s390:390",
+ 3, /* section alignment power */
+ true, /* the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ &bfd_s390_esame_arch
+};
diff --git a/bfd/elf.c b/bfd/elf.c
index 5ae24ee..d5d0579 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3320,6 +3320,9 @@ prep_headers (abfd)
case bfd_arch_m68hc12:
i_ehdrp->e_machine = EM_68HC12;
break;
+ case bfd_arch_s390:
+ i_ehdrp->e_machine = EM_S390;
+ break;
case bfd_arch_m68k:
i_ehdrp->e_machine = EM_68K;
break;
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
new file mode 100644
index 0000000..313a41a
--- /dev/null
+++ b/bfd/elf32-s390.c
@@ -0,0 +1,2179 @@
+/* IBM S/390-specific support for 32-bit ELF
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Carl B. Pedersen and Martin Schwidefsky.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+
+static reloc_howto_type *elf_s390_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+static void elf_s390_info_to_howto
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+static boolean elf_s390_is_local_label_name PARAMS ((bfd *, const char *));
+static struct bfd_hash_entry *elf_s390_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct bfd_link_hash_table *elf_s390_link_hash_table_create
+ PARAMS ((bfd *));
+static boolean elf_s390_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+static boolean elf_s390_adjust_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static boolean elf_s390_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static boolean elf_s390_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static boolean elf_s390_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
+static boolean elf_s390_finish_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+#define USE_RELA 1 /* We want RELA relocations, not REL. */
+
+#include "elf/s390.h"
+
+/* The relocation "howto" table. */
+
+static reloc_howto_type elf_howto_table[] =
+{
+ HOWTO (R_390_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_390_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO(R_390_8, 0, 0, 8, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_8", false, 0,0x000000ff, false),
+ HOWTO(R_390_12, 0, 1, 12, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_12", false, 0,0x00000fff, false),
+ HOWTO(R_390_16, 0, 1, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_16", false, 0,0x0000ffff, false),
+ HOWTO(R_390_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_32", false, 0,0xffffffff, false),
+ HOWTO(R_390_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32", false, 0,0xffffffff, true),
+ HOWTO(R_390_GOT12, 0, 1, 12, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_GOT12", false, 0,0x00000fff, false),
+ HOWTO(R_390_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT32", false, 0,0xffffffff, false),
+ HOWTO(R_390_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32", false, 0,0xffffffff, true),
+ HOWTO(R_390_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_COPY", false, 0,0xffffffff, false),
+ HOWTO(R_390_GLOB_DAT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GLOB_DAT",false, 0,0xffffffff, false),
+ HOWTO(R_390_JMP_SLOT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_JMP_SLOT",false, 0,0xffffffff, false),
+ HOWTO(R_390_RELATIVE, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_RELATIVE",false, 0,0xffffffff, false),
+ HOWTO(R_390_GOTOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTOFF", false, 0,0xffffffff, false),
+ HOWTO(R_390_GOTPC, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPC", false, 0,0xffffffff, true),
+ HOWTO(R_390_GOT16, 0, 1, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT16", false, 0,0x0000ffff, false),
+ HOWTO(R_390_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16", false, 0,0x0000ffff, true),
+ HOWTO(R_390_PC16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16DBL", false, 0,0x0000ffff, true),
+ HOWTO(R_390_PLT16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT16DBL", false, 0,0x0000ffff, true),
+};
+
+/* GNU extension to record C++ vtable hierarchy. */
+static reloc_howto_type elf32_s390_vtinherit_howto =
+ HOWTO (R_390_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_390_GNU_VTINHERIT", false,0, 0, false);
+static reloc_howto_type elf32_s390_vtentry_howto =
+ HOWTO (R_390_GNU_VTENTRY, 0,2,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_390_GNU_VTENTRY", false,0,0, false);
+
+static reloc_howto_type *
+elf_s390_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ switch (code) {
+ case BFD_RELOC_NONE:
+ return &elf_howto_table[(int) R_390_NONE];
+ case BFD_RELOC_8:
+ return &elf_howto_table[(int) R_390_8];
+ case BFD_RELOC_390_12:
+ return &elf_howto_table[(int) R_390_12];
+ case BFD_RELOC_16:
+ return &elf_howto_table[(int) R_390_16];
+ case BFD_RELOC_32:
+ return &elf_howto_table[(int) R_390_32];
+ case BFD_RELOC_CTOR:
+ return &elf_howto_table[(int) R_390_32];
+ case BFD_RELOC_32_PCREL:
+ return &elf_howto_table[(int) R_390_PC32];
+ case BFD_RELOC_390_GOT12:
+ return &elf_howto_table[(int) R_390_GOT12];
+ case BFD_RELOC_32_GOT_PCREL:
+ return &elf_howto_table[(int) R_390_GOT32];
+ case BFD_RELOC_390_PLT32:
+ return &elf_howto_table[(int) R_390_PLT32];
+ case BFD_RELOC_390_COPY:
+ return &elf_howto_table[(int) R_390_COPY];
+ case BFD_RELOC_390_GLOB_DAT:
+ return &elf_howto_table[(int) R_390_GLOB_DAT];
+ case BFD_RELOC_390_JMP_SLOT:
+ return &elf_howto_table[(int) R_390_JMP_SLOT];
+ case BFD_RELOC_390_RELATIVE:
+ return &elf_howto_table[(int) R_390_RELATIVE];
+ case BFD_RELOC_32_GOTOFF:
+ return &elf_howto_table[(int) R_390_GOTOFF];
+ case BFD_RELOC_390_GOTPC:
+ return &elf_howto_table[(int) R_390_GOTPC];
+ case BFD_RELOC_390_GOT16:
+ return &elf_howto_table[(int) R_390_GOT16];
+ case BFD_RELOC_16_PCREL:
+ return &elf_howto_table[(int) R_390_PC16];
+ case BFD_RELOC_390_PC16DBL:
+ return &elf_howto_table[(int) R_390_PC16DBL];
+ case BFD_RELOC_390_PLT16DBL:
+ return &elf_howto_table[(int) R_390_PLT16DBL];
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &elf32_s390_vtinherit_howto;
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &elf32_s390_vtentry_howto;
+ default:
+ break;
+ }
+ return 0;
+}
+
+/* We need to use ELF32_R_TYPE so we have our own copy of this function,
+ and elf32-s390.c has its own copy. */
+
+static void
+elf_s390_info_to_howto (abfd, cache_ptr, dst)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr;
+ Elf_Internal_Rela *dst;
+{
+ switch (ELF32_R_TYPE(dst->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ cache_ptr->howto = &elf32_s390_vtinherit_howto;
+ break;
+
+ case R_390_GNU_VTENTRY:
+ cache_ptr->howto = &elf32_s390_vtentry_howto;
+ break;
+
+ default:
+ BFD_ASSERT (ELF32_R_TYPE(dst->r_info) < (unsigned int) R_390_max);
+ cache_ptr->howto = &elf_howto_table[ELF32_R_TYPE(dst->r_info)];
+ }
+}
+
+static boolean
+elf_s390_is_local_label_name (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (name[0] == '.' && (name[1] == 'X' || name[1] == 'L'))
+ return true;
+
+ return _bfd_elf_is_local_label_name (abfd, name);
+}
+
+/* Functions for the 390 ELF linker. */
+
+/* The name of the dynamic interpreter. This is put in the .interp
+ section. */
+
+#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+
+/* The nop opcode we use. */
+
+#define s390_NOP 0x07070707
+
+
+/* The size in bytes of the first entry in the procedure linkage table. */
+#define PLT_FIRST_ENTRY_SIZE 32
+/* The size in bytes of an entry in the procedure linkage table. */
+#define PLT_ENTRY_SIZE 32
+
+#define GOT_ENTRY_SIZE 4
+
+/* The first three entries in a procedure linkage table are reserved,
+ and the initial contents are unimportant (we zero them out).
+ Subsequent entries look like this. See the SVR4 ABI 386
+ supplement to see how this works. */
+
+/* For the s390, simple addr offset can only be 0 - 4096.
+ To use the full 2 GB address space, several instructions
+ are needed to load an address in a register and execute
+ a branch( or just saving the address)
+
+ Furthermore, only r 0 and 1 are free to use!!! */
+
+/* The first 3 words in the GOT are then reserved.
+ Word 0 is the address of the dynamic table.
+ Word 1 is a pointer to a structure describing the object
+ Word 2 is used to point to the loader entry address.
+
+ The code for position independand PLT entries looks like this:
+
+ r12 holds addr of the current GOT at entry to the PLT
+
+ The GOT holds the address in the PLT to be executed.
+ The loader then gets:
+ 24(15) = Pointer to the structure describing the object.
+ 28(15) = Offset in symbol table
+
+ The loader must then find the module where the function is
+ and insert the address in the GOT.
+
+ Note: 390 can only address +- 64 K relative.
+ We check if offset > 65536, then make a relative branch -64xxx
+ back to a previous defined branch
+
+PLT1: BASR 1,0 # 2 bytes
+ L 1,22(1) # 4 bytes Load offset in GOT in r 1
+ L 1,(1,12) # 4 bytes Load address from GOT in r1
+ BCR 15,1 # 2 bytes Jump to address
+RET1: BASR 1,0 # 2 bytes Return from GOT 1st time
+ L 1,14(1) # 4 bytes Load offset in symol table in r1
+ BRC 15,-x # 4 bytes Jump to start of PLT
+ .word 0 # 2 bytes filler
+ .long ? # 4 bytes offset in GOT
+ .long ? # 4 bytes offset into symbol table
+
+ This was the general case. There are two additional, optimizes PLT
+ definitions. One for GOT offsets < 4096 and one for GOT offsets < 32768.
+ First the one for GOT offsets < 4096:
+
+PLT1: L 1,<offset>(12) # 4 bytes Load address from GOT in R1
+ BCR 15,1 # 2 bytes Jump to address
+ .word 0,0,0 # 6 bytes filler
+RET1: BASR 1,0 # 2 bytes Return from GOT 1st time
+ L 1,14(1) # 4 bytes Load offset in symbol table in r1
+ BRC 15,-x # 4 bytes Jump to start of PLT
+ .word 0,0,0 # 6 bytes filler
+ .long ? # 4 bytes offset into symbol table
+
+ Second the one for GOT offsets < 32768:
+
+PLT1: LHI 1,<offset> # 4 bytes Load offset in GOT to r1
+ L 1,(1,12) # 4 bytes Load address from GOT to r1
+ BCR 15,1 # 2 bytes Jump to address
+ .word 0 # 2 bytes filler
+RET1: BASR 1,0 # 2 bytes Return from GOT 1st time
+ L 1,14(1) # 4 bytes Load offset in symbol table in r1
+ BRC 15,-x # 4 bytes Jump to start of PLT
+ .word 0,0,0 # 6 bytes filler
+ .long ? # 4 bytes offset into symbol table
+
+Total = 32 bytes per PLT entry
+
+ The code for static build PLT entries looks like this:
+
+PLT1: BASR 1,0 # 2 bytes
+ L 1,22(1) # 4 bytes Load address of GOT entry
+ L 1,0(0,1) # 4 bytes Load address from GOT in r1
+ BCR 15,1 # 2 bytes Jump to address
+RET1: BASR 1,0 # 2 bytes Return from GOT 1st time
+ L 1,14(1) # 4 bytes Load offset in symbol table in r1
+ BRC 15,-x # 4 bytes Jump to start of PLT
+ .word 0 # 2 bytes filler
+ .long ? # 4 bytes address of GOT entry
+ .long ? # 4 bytes offset into symbol table */
+
+#define PLT_PIC_ENTRY_WORD0 0x0d105810
+#define PLT_PIC_ENTRY_WORD1 0x10165811
+#define PLT_PIC_ENTRY_WORD2 0xc00007f1
+#define PLT_PIC_ENTRY_WORD3 0x0d105810
+#define PLT_PIC_ENTRY_WORD4 0x100ea7f4
+
+#define PLT_PIC12_ENTRY_WORD0 0x5810c000
+#define PLT_PIC12_ENTRY_WORD1 0x07f10000
+#define PLT_PIC12_ENTRY_WORD2 0x00000000
+#define PLT_PIC12_ENTRY_WORD3 0x0d105810
+#define PLT_PIC12_ENTRY_WORD4 0x100ea7f4
+
+#define PLT_PIC16_ENTRY_WORD0 0xa7180000
+#define PLT_PIC16_ENTRY_WORD1 0x5811c000
+#define PLT_PIC16_ENTRY_WORD2 0x07f10000
+#define PLT_PIC16_ENTRY_WORD3 0x0d105810
+#define PLT_PIC16_ENTRY_WORD4 0x100ea7f4
+
+#define PLT_ENTRY_WORD0 0x0d105810
+#define PLT_ENTRY_WORD1 0x10165810
+#define PLT_ENTRY_WORD2 0x100007f1
+#define PLT_ENTRY_WORD3 0x0d105810
+#define PLT_ENTRY_WORD4 0x100ea7f4
+
+/* The first PLT entry pushes the offset into the symbol table
+ from R1 onto the stack at 8(15) and the loader object info
+ at 12(15), loads the loader address in R1 and jumps to it. */
+
+/* The first entry in the PLT for PIC code:
+
+PLT0:
+ ST 1,28(15) # R1 has offset into symbol table
+ L 1,4(12) # Get loader ino(object struct address)
+ ST 1,24(15) # Store address
+ L 1,8(12) # Entry address of loader in R1
+ BR 1 # Jump to loader
+
+ The first entry in the PLT for static code:
+
+PLT0:
+ ST 1,28(15) # R1 has offset into symbol table
+ BASR 1,0
+ L 1,18(0,1) # Get address of GOT
+ MVC 24(4,15),4(1) # Move loader ino to stack
+ L 1,8(1) # Get address of loader
+ BR 1 # Jump to loader
+ .word 0 # filler
+ .long got # address of GOT */
+
+#define PLT_PIC_FIRST_ENTRY_WORD0 0x5010f01c
+#define PLT_PIC_FIRST_ENTRY_WORD1 0x5810c004
+#define PLT_PIC_FIRST_ENTRY_WORD2 0x5010f018
+#define PLT_PIC_FIRST_ENTRY_WORD3 0x5810c008
+#define PLT_PIC_FIRST_ENTRY_WORD4 0x07f10000
+
+#define PLT_FIRST_ENTRY_WORD0 0x5010f01c
+#define PLT_FIRST_ENTRY_WORD1 0x0d105810
+#define PLT_FIRST_ENTRY_WORD2 0x1012D203
+#define PLT_FIRST_ENTRY_WORD3 0xf0181004
+#define PLT_FIRST_ENTRY_WORD4 0x58101008
+#define PLT_FIRST_ENTRY_WORD5 0x07f10000
+
+/* The s390 linker needs to keep track of the number of relocs that it
+ decides to copy in check_relocs for each symbol. This is so that
+ it can discard PC relative relocs if it doesn't need them when
+ linking with -Bsymbolic. We store the information in a field
+ extending the regular ELF linker hash table. */
+
+/* This structure keeps track of the number of PC relative relocs we
+ have copied for a given symbol. */
+
+struct elf_s390_pcrel_relocs_copied
+{
+ /* Next section. */
+ struct elf_s390_pcrel_relocs_copied *next;
+ /* A section in dynobj. */
+ asection *section;
+ /* Number of relocs copied in this section. */
+ bfd_size_type count;
+};
+
+/* s390 ELF linker hash entry. */
+
+struct elf_s390_link_hash_entry
+{
+ struct elf_link_hash_entry root;
+
+ /* Number of PC relative relocs copied for this symbol. */
+ struct elf_s390_pcrel_relocs_copied *pcrel_relocs_copied;
+};
+
+/* s390 ELF linker hash table. */
+
+struct elf_s390_link_hash_table
+{
+ struct elf_link_hash_table root;
+};
+
+/* Declare this now that the above structures are defined. */
+
+static boolean elf_s390_discard_copies
+ PARAMS ((struct elf_s390_link_hash_entry *, PTR));
+
+/* Traverse an s390 ELF linker hash table. */
+
+#define elf_s390_link_hash_traverse(table, func, info) \
+ (elf_link_hash_traverse \
+ (&(table)->root, \
+ (boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (info)))
+
+/* Get the s390 ELF linker hash table from a link_info structure. */
+
+#define elf_s390_hash_table(p) \
+ ((struct elf_s390_link_hash_table *) ((p)->hash))
+
+/* Create an entry in an s390 ELF linker hash table. */
+
+static struct bfd_hash_entry *
+elf_s390_link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ struct elf_s390_link_hash_entry *ret =
+ (struct elf_s390_link_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct elf_s390_link_hash_entry *) NULL)
+ ret = ((struct elf_s390_link_hash_entry *)
+ bfd_hash_allocate (table,
+ sizeof (struct elf_s390_link_hash_entry)));
+ if (ret == (struct elf_s390_link_hash_entry *) NULL)
+ return (struct bfd_hash_entry *) ret;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct elf_s390_link_hash_entry *)
+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ table, string));
+ if (ret != (struct elf_s390_link_hash_entry *) NULL)
+ {
+ ret->pcrel_relocs_copied = NULL;
+ }
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+/* Create an s390 ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+elf_s390_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct elf_s390_link_hash_table *ret;
+
+ ret = ((struct elf_s390_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct elf_s390_link_hash_table)));
+ if (ret == (struct elf_s390_link_hash_table *) NULL)
+ return NULL;
+
+ if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
+ elf_s390_link_hash_newfunc))
+ {
+ bfd_release (abfd, ret);
+ return NULL;
+ }
+
+ return &ret->root.root;
+}
+
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table or procedure linkage
+ table. */
+
+static boolean
+elf_s390_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;
+ asection *sgot;
+ asection *srelgot;
+ asection *sreloc;
+
+ if (info->relocateable)
+ return true;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_offsets (abfd);
+
+ sgot = NULL;
+ srelgot = NULL;
+ sreloc = NULL;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ /* Some relocs require a global offset table. */
+ if (dynobj == NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOTOFF:
+ case R_390_GOTPC:
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return false;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ /* This symbol requires a global offset table entry. */
+
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+
+ if (srelgot == NULL
+ && (h != NULL || info->shared))
+ {
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+ return false;
+ }
+ }
+
+ if (h != NULL)
+ {
+ if (h->got.refcount == -1)
+ {
+ 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;
+ }
+
+ sgot->_raw_size += 4;
+ srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ else
+ h->got.refcount += 1;
+ }
+ else
+ {
+ /* This is a global offset table entry for a local symbol. */
+ if (local_got_refcounts == NULL)
+ {
+ size_t size;
+
+ size = symtab_hdr->sh_info * sizeof (bfd_signed_vma);
+ local_got_refcounts = (bfd_signed_vma *)
+ bfd_alloc (abfd, size);
+ if (local_got_refcounts == NULL)
+ return false;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ memset (local_got_refcounts, -1, size);
+ }
+ if (local_got_refcounts[r_symndx] == -1)
+ {
+ local_got_refcounts[r_symndx] = 1;
+
+ sgot->_raw_size += 4;
+ if (info->shared)
+ {
+ /* If we are generating a shared object, we need to
+ output a R_390_RELATIVE reloc so that the dynamic
+ linker can adjust this GOT entry. */
+ srelgot->_raw_size += sizeof (Elf32_External_Rela);
+ }
+ }
+ else
+ local_got_refcounts[r_symndx] += 1;
+ }
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32:
+ /* This symbol requires a procedure linkage table entry. We
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code which is
+ never referenced by a dynamic object, in which case we
+ don't need to generate a procedure linkage table entry
+ after all. */
+
+ /* If this is a local symbol, we resolve it directly without
+ creating a procedure linkage table entry. */
+ if (h == NULL)
+ continue;
+
+ 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_390_8:
+ case R_390_16:
+ case R_390_32:
+ case R_390_PC16:
+ case R_390_PC16DBL:
+ case R_390_PC32:
+ if (h != NULL)
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
+ /* If we are creating a shared library, and this is a reloc
+ against a global symbol, or a non PC relative reloc
+ against a local symbol, then we need to copy the reloc
+ into the shared library. However, if we are linking with
+ -Bsymbolic, we do not need to copy a reloc against a
+ global symbol which is defined in an object we are
+ including in the link (i.e., DEF_REGULAR is set). At
+ this point we have not seen all the input files, so it is
+ possible that DEF_REGULAR is not set now but will be set
+ later (it is never cleared). We account for that
+ possibility below by storing information in the
+ pcrel_relocs_copied field of the hash table entry. */
+ if (info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && ((ELF32_R_TYPE (rel->r_info) != R_390_PC16 &&
+ ELF32_R_TYPE (rel->r_info) != R_390_PC16DBL &&
+ ELF32_R_TYPE (rel->r_info) != R_390_PC32)
+ || (h != NULL
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ {
+ /* When creating a shared object, we must copy these
+ reloc types into the output file. We create a reloc
+ section in dynobj and make room for this reloc. */
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (abfd, sec),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ sreloc = bfd_make_section (dynobj, name);
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (sreloc == NULL
+ || ! bfd_set_section_flags (dynobj, sreloc, flags)
+ || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+ return false;
+ }
+ }
+
+ sreloc->_raw_size += sizeof (Elf32_External_Rela);
+
+ /* 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_s390 linker
+ hash table, which means that h is really a pointer to
+ an elf_s390_link_hash_entry. */
+ if (h != NULL
+ && (ELF32_R_TYPE (rel->r_info) == R_390_PC16 ||
+ ELF32_R_TYPE (rel->r_info) == R_390_PC16DBL ||
+ ELF32_R_TYPE (rel->r_info) == R_390_PC32))
+ {
+ struct elf_s390_link_hash_entry *eh;
+ struct elf_s390_pcrel_relocs_copied *p;
+
+ eh = (struct elf_s390_link_hash_entry *) h;
+
+ for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
+ if (p->section == sreloc)
+ break;
+
+ if (p == NULL)
+ {
+ p = ((struct elf_s390_pcrel_relocs_copied *)
+ bfd_alloc (dynobj, sizeof *p));
+ if (p == NULL)
+ return false;
+ p->next = eh->pcrel_relocs_copied;
+ eh->pcrel_relocs_copied = p;
+ p->section = sreloc;
+ p->count = 0;
+ }
+
+ ++p->count;
+ }
+ }
+
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_390_GNU_VTINHERIT:
+ if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ return false;
+ break;
+
+ /* This relocation describes which C++ vtable entries are actually
+ used. Record for later use during GC. */
+ case R_390_GNU_VTENTRY:
+ if (!_bfd_elf32_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return true;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ case R_390_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static boolean
+elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ 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, ".rela.got");
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOTOFF:
+ case R_390_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_Rela);
+ }
+ }
+ }
+ 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_Rela);
+ }
+ }
+ }
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_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;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+ regular object. The current definition is in some section of the
+ dynamic object, but we're not including those sections. We have to
+ change the definition to something the rest of the link can
+ understand. */
+
+static boolean
+elf_s390_adjust_dynamic_symbol (info, h)
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+{
+ bfd *dynobj;
+ asection *s;
+ unsigned int power_of_two;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (dynobj != NULL
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+ || h->weakdef != NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)));
+
+ /* If this is a function, put it in the procedure linkage table. We
+ will fill in the contents of the procedure linkage table later
+ (although we could actually do it here). */
+ 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)
+ || (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, 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;
+ }
+
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (h->dynindx == -1)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+
+ s = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (s != NULL);
+
+ /* The first entry in .plt is reserved. */
+ if (s->_raw_size == 0)
+ s->_raw_size = PLT_FIRST_ENTRY_SIZE;
+
+ /* If this symbol is not defined in a regular file, and we are
+ not generating a shared library, then set the symbol to this
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+ }
+
+ h->plt.offset = s->_raw_size;
+
+ /* Make room for this entry. */
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* We also need to make an entry in the .got.plt section, which
+ will be placed in the .got section by the linker script. */
+ s = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size += GOT_ENTRY_SIZE;
+
+ /* We also need to make an entry in the .rela.plt section. */
+ s = bfd_get_section_by_name (dynobj, ".rela.plt");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size += sizeof (Elf32_External_Rela);
+
+ return true;
+ }
+
+ /* If this is a weak symbol, and there is a real definition, the
+ processor independent code will have arranged for us to see the
+ real definition first, and we can just use the same value. */
+ if (h->weakdef != NULL)
+ {
+ BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
+ || h->weakdef->root.type == bfd_link_hash_defweak);
+ h->root.u.def.section = h->weakdef->root.u.def.section;
+ h->root.u.def.value = h->weakdef->root.u.def.value;
+ return true;
+ }
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. */
+ if (info->shared)
+ return true;
+
+ /* 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 = bfd_get_section_by_name (dynobj, ".dynbss");
+ BFD_ASSERT (s != NULL);
+
+ /* We must generate a R_390_COPY reloc to tell the dynamic linker
+ to copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rel.bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ asection *srel;
+
+ srel = bfd_get_section_by_name (dynobj, ".rela.bss");
+ BFD_ASSERT (srel != NULL);
+ srel->_raw_size += sizeof (Elf32_External_Rela);
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ }
+
+ /* We need to figure out the alignment required for this symbol. I
+ have no idea how ELF linkers handle this. */
+ power_of_two = bfd_log2 (h->size);
+ if (power_of_two > 3)
+ power_of_two = 3;
+
+ /* Apply the required alignment. */
+ s->_raw_size = BFD_ALIGN (s->_raw_size,
+ (bfd_size_type) (1 << power_of_two));
+ if (power_of_two > bfd_get_section_alignment (dynobj, s))
+ {
+ if (! bfd_set_section_alignment (dynobj, s, power_of_two))
+ return false;
+ }
+
+ /* Define the symbol as being at this point in the section. */
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+
+ /* Increment the section size to make room for the symbol. */
+ s->_raw_size += h->size;
+
+ return true;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static boolean
+elf_s390_size_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *dynobj;
+ asection *s;
+ boolean reltext;
+ boolean relocs;
+ boolean plt;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (! info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+ else
+ {
+ /* We may have created entries in the .rela.got section.
+ However, if we are not creating the dynamic sections, we will
+ not actually use these entries. Reset the size of .rela.got,
+ which will cause it to get stripped from the output file
+ below. */
+ s = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (s != NULL)
+ s->_raw_size = 0;
+ }
+
+ /* If this is a -Bsymbolic shared link, then we need to discard all
+ PC relative relocs against symbols defined in a regular object.
+ We allocated space for them in the check_relocs routine, but we
+ will not fill them in in the relocate_section routine. */
+ if (info->shared)
+ elf_s390_link_hash_traverse (elf_s390_hash_table (info),
+ elf_s390_discard_copies,
+ (PTR) info);
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ plt = false;
+ reltext = false;
+ relocs = false;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ const char *name;
+ boolean strip;
+
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ /* It's OK to base decisions on the section name, because none
+ of the dynobj section names depend upon the input files. */
+ name = bfd_get_section_name (dynobj, s);
+
+ strip = false;
+
+ if (strcmp (name, ".plt") == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ strip = true;
+ }
+ else
+ {
+ /* Remember whether there is a PLT. */
+ plt = true;
+ }
+ }
+ else if (strncmp (name, ".rela", 5) == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is to handle .rela.bss and
+ .rel.plt. We must create it in
+ create_dynamic_sections, because it must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ strip = true;
+ }
+ else
+ {
+ asection *target;
+
+ /* Remember whether there are any reloc sections other
+ than .rela.plt. */
+ if (strcmp (name, ".rela.plt") != 0)
+ {
+ const char *outname;
+
+ relocs = true;
+
+ /* If this relocation section applies to a read only
+ section, then we probably need a DT_TEXTREL
+ entry. The entries in the .rela.plt section
+ really apply to the .got section, which we
+ created ourselves and so know is not readonly. */
+ outname = bfd_get_section_name (output_bfd,
+ s->output_section);
+ target = bfd_get_section_by_name (output_bfd, outname + 5);
+ if (target != NULL
+ && (target->flags & SEC_READONLY) != 0
+ && (target->flags & SEC_ALLOC) != 0)
+ reltext = true;
+ }
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
+ else if (strncmp (name, ".got", 4) != 0)
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ if (strip)
+ {
+ _bfd_strip_section_from_output (info, s);
+ continue;
+ }
+
+ /* Allocate memory for the section contents. */
+ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ if (s->contents == NULL && s->_raw_size != 0)
+ return false;
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in elf_s390_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+ if (! info->shared)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ return false;
+ }
+
+ if (plt)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_PLTRELSZ, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0))
+ return false;
+ }
+
+ if (relocs)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_RELA, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_RELASZ, 0)
+ || ! bfd_elf32_add_dynamic_entry (info, DT_RELAENT,
+ sizeof (Elf32_External_Rela)))
+ return false;
+ }
+
+ if (reltext)
+ {
+ if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ return false;
+ info->flags |= DF_TEXTREL;
+ }
+ }
+
+ return true;
+}
+
+/* This function is called via elf_s390_link_hash_traverse if we are
+ creating a shared object with -Bsymbolic. It discards the space
+ allocated to copy PC relative relocs against symbols which are
+ defined in regular objects. We allocated space for them in the
+ check_relocs routine, but we won't fill them in in the
+ relocate_section routine. */
+
+/*ARGSUSED*/
+static boolean
+elf_s390_discard_copies (h, inf)
+ struct elf_s390_link_hash_entry *h;
+ PTR inf;
+{
+ struct elf_s390_pcrel_relocs_copied *s;
+ 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_Rela);
+ }
+ return true;
+}
+/* Relocate a 390 ELF section. */
+
+static boolean
+elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+{
+ bfd *dynobj;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_vma *local_got_offsets;
+ asection *sgot;
+ asection *splt;
+ asection *sreloc;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+
+ sgot = NULL;
+ splt = NULL;
+ sreloc = 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;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+ if (r_type == (int) R_390_GNU_VTINHERIT
+ || r_type == (int) R_390_GNU_VTENTRY)
+ continue;
+ if (r_type < 0 || r_type >= (int) R_390_max)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ howto = elf_howto_table + r_type;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ if (info->relocateable)
+ {
+ /* This is a relocateable link. We don't have to change
+ anything, unless the reloc is against a section symbol,
+ in which case we have to adjust according to where the
+ section symbol winds up in the output section. */
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ if (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. */
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ }
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ if (r_type == R_390_GOTPC
+ || ((r_type == R_390_PLT16DBL ||
+ r_type == R_390_PLT32)
+ && splt != NULL
+ && h->plt.offset != (bfd_vma) -1)
+ || ((r_type == R_390_GOT12 ||
+ r_type == R_390_GOT16 ||
+ r_type == R_390_GOT32)
+ && elf_hash_table (info)->dynamic_sections_created
+ && (! info->shared
+ || (! info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || (info->shared
+ && ((! info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && ( r_type == R_390_8 ||
+ r_type == R_390_16 ||
+ r_type == R_390_32 ||
+ r_type == R_390_PC16 ||
+ r_type == R_390_PC16DBL ||
+ r_type == R_390_PC32)
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_386_32 relocations in its
+ sections against symbols defined externally
+ in shared libraries. We can't do anything
+ with them here. */
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
+ {
+ /* In these cases, we don't need the relocation
+ value. We check specially because in some
+ obscure cases sec->output_section will be NULL. */
+ relocation = 0;
+ }
+ else if (sec->output_section == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+ bfd_get_filename (input_bfd), h->root.root.string,
+ bfd_get_section_name (input_bfd, input_section));
+ relocation = 0;
+ }
+ else
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ relocation = 0;
+ else if (info->shared && !info->symbolic
+ && !info->no_undefined
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ relocation = 0;
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined
+ || ELF_ST_VISIBILITY (h->other)))))
+ return false;
+ relocation = 0;
+ }
+ }
+
+ switch (r_type)
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ /* Relocation is to the entry for this symbol in the global
+ offset table. */
+ BFD_ASSERT (sgot != NULL);
+
+ if (h != NULL)
+ {
+ bfd_vma off;
+
+ off = h->got.offset;
+ BFD_ASSERT (off != (bfd_vma) -1);
+
+ if (! elf_hash_table (info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ {
+ /* This is actually a static link, or it is a
+ -Bsymbolic link and the symbol is defined
+ locally, 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 2, we use the
+ least significant bit to record whether we have
+ initialized it already.
+
+ When doing a dynamic link, we create a .rel.got
+ relocation entry to initialize the value. This
+ is done in the finish_dynamic_symbol routine. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd, relocation,
+ sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+ relocation = sgot->output_offset + off;
+ }
+ else
+ {
+ bfd_vma off;
+
+ BFD_ASSERT (local_got_offsets != NULL
+ && local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+ off = local_got_offsets[r_symndx];
+
+ /* The offset must always be a multiple of 4. We use
+ the least significant bit to record whether we have
+ already generated the necessary reloc. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_32 (output_bfd, relocation, sgot->contents + off);
+
+ if (info->shared)
+ {
+ asection *srelgot;
+ Elf_Internal_Rela outrel;
+
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + off);
+ outrel.r_info = ELF32_R_INFO (0, R_390_RELATIVE);
+ outrel.r_addend = relocation;
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count));
+ ++srelgot->reloc_count;
+ }
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ relocation = sgot->output_offset + off;
+ }
+
+
+ break;
+
+ case R_390_GOTOFF:
+ /* Relocation is relative to the start of the global offset
+ table. */
+
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+ /* Note that sgot->output_offset is not involved in this
+ calculation. We always want the start of .got. If we
+ defined _GLOBAL_OFFSET_TABLE in a different way, as is
+ permitted by the ABI, we might have to change this
+ calculation. */
+ relocation -= sgot->output_section->vma;
+
+ break;
+
+ case R_390_GOTPC:
+ /* Use global offset table as symbol value. */
+
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+ relocation = sgot->output_section->vma;
+
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table. */
+
+ /* Resolve a PLT32 reloc against a local symbol directly,
+ without using the procedure linkage table. */
+ if (h == NULL)
+ break;
+
+ if (h->plt.offset == (bfd_vma) -1 || splt == NULL)
+ {
+ /* We didn't make a PLT entry for this symbol. This
+ happens when statically linking PIC code, or when
+ using -Bsymbolic. */
+ break;
+ }
+
+ relocation = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+
+ break;
+
+ case R_390_8:
+ case R_390_16:
+ case R_390_32:
+ case R_390_PC16:
+ case R_390_PC16DBL:
+ case R_390_PC32:
+ if (info->shared
+ && (input_section->flags & SEC_ALLOC) != 0
+ && ((r_type != R_390_PC16 &&
+ r_type != R_390_PC16DBL &&
+ r_type != R_390_PC32)
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ {
+ Elf_Internal_Rela outrel;
+ boolean skip, relocate;
+
+ /* When generating a shared object, these relocations
+ are copied into the output file to be resolved at run
+ time. */
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ skip = false;
+
+ if (elf_section_data (input_section)->stab_info == NULL)
+ outrel.r_offset = rel->r_offset;
+ else
+ {
+ bfd_vma off;
+
+ off = (_bfd_stab_section_offset
+ (output_bfd, &elf_hash_table (info)->stab_info,
+ input_section,
+ &elf_section_data (input_section)->stab_info,
+ rel->r_offset));
+ if (off == (bfd_vma) -1)
+ skip = true;
+ outrel.r_offset = off;
+ }
+
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ if (skip)
+ {
+ memset (&outrel, 0, sizeof outrel);
+ relocate = false;
+ }
+ else if (r_type == R_390_PC16 ||
+ r_type == R_390_PC16DBL ||
+ r_type == R_390_PC32)
+ {
+ BFD_ASSERT (h != NULL && h->dynindx != -1);
+ relocate = false;
+ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ else
+ {
+ /* h->dynindx may be -1 if this symbol was marked to
+ become local. */
+ if (h == NULL
+ || ((info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) != 0))
+ {
+ relocate = true;
+ outrel.r_info = ELF32_R_INFO (0, R_390_RELATIVE);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ else
+ {
+ BFD_ASSERT (h->dynindx != -1);
+ relocate = false;
+ outrel.r_info = ELF32_R_INFO (h->dynindx, R_390_32);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &outrel,
+ (((Elf32_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+
+ /* If this reloc is against an external symbol, we do
+ not want to fiddle with the addend. Otherwise, we
+ need to include the symbol value so that it becomes
+ an addend for the dynamic reloc. */
+ if (! relocate)
+ continue;
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend);
+
+ if (r != bfd_reloc_ok)
+ {
+ switch (r)
+ {
+ default:
+ case bfd_reloc_outofrange:
+ abort ();
+ case bfd_reloc_overflow:
+ {
+ const char *name;
+
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (name == NULL)
+ return false;
+ if (*name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return false;
+ }
+ break;
+ }
+ }
+ }
+
+ return true;
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static boolean
+elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ bfd *dynobj;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ asection *splt;
+ asection *srela;
+ Elf_Internal_Rela rela;
+ bfd_vma relative_offset;
+ bfd_vma got_offset;
+ bfd_vma plt_index;
+ asection *sgot;
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up. */
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ srela = bfd_get_section_by_name (dynobj, ".rela.plt");
+ BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
+
+ /* Calc. index no.
+ Current offset - size first entry / entry size. */
+ plt_index = (h->plt.offset - PLT_FIRST_ENTRY_SIZE) / PLT_ENTRY_SIZE;
+
+ /* Offset in GOT is PLT index plus GOT headers(3) times 4,
+ addr & GOT addr. */
+ got_offset = (plt_index + 3) * GOT_ENTRY_SIZE;
+
+ /* S390 uses halfwords for relative branch calc! */
+ relative_offset = - ((PLT_FIRST_ENTRY_SIZE +
+ (PLT_ENTRY_SIZE * plt_index) + 18)/2);
+ /* If offset is > 32768, branch to a previous branch
+ 390 can only handle +-64 K jumps. */
+ if ( -32768 > (int)relative_offset )
+ relative_offset = -(((65536/PLT_ENTRY_SIZE-1)*PLT_ENTRY_SIZE)/2);
+
+ /* Fill in the entry in the procedure linkage table. */
+ if (!info->shared)
+ {
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD0,
+ splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD1,
+ splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD2,
+ splt->contents + h->plt.offset + 8);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD3,
+ splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD4,
+ splt->contents + h->plt.offset + 16);
+ bfd_put_32 (output_bfd, 0+(relative_offset << 16),
+ splt->contents + h->plt.offset + 20);
+ bfd_put_32 (output_bfd,
+ (sgot->output_section->vma +
+ sgot->output_offset +
+ got_offset),
+ splt->contents + h->plt.offset + 24);
+ }
+ else if (got_offset < 4096)
+ {
+ bfd_put_32 (output_bfd, PLT_PIC12_ENTRY_WORD0 + got_offset,
+ splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd, PLT_PIC12_ENTRY_WORD1,
+ splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, PLT_PIC12_ENTRY_WORD2,
+ splt->contents + h->plt.offset + 8);
+ bfd_put_32 (output_bfd, PLT_PIC12_ENTRY_WORD3,
+ splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, PLT_PIC12_ENTRY_WORD4,
+ splt->contents + h->plt.offset + 16);
+ bfd_put_32 (output_bfd, 0+(relative_offset << 16),
+ splt->contents + h->plt.offset + 20);
+ bfd_put_32 (output_bfd, 0,
+ splt->contents + h->plt.offset + 24);
+ }
+ else if (got_offset < 32768)
+ {
+ bfd_put_32 (output_bfd, PLT_PIC16_ENTRY_WORD0 + got_offset,
+ splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd, PLT_PIC16_ENTRY_WORD1,
+ splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, PLT_PIC16_ENTRY_WORD2,
+ splt->contents + h->plt.offset + 8);
+ bfd_put_32 (output_bfd, PLT_PIC16_ENTRY_WORD3,
+ splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, PLT_PIC16_ENTRY_WORD4,
+ splt->contents + h->plt.offset + 16);
+ bfd_put_32 (output_bfd, 0+(relative_offset << 16),
+ splt->contents + h->plt.offset + 20);
+ bfd_put_32 (output_bfd, 0,
+ splt->contents + h->plt.offset + 24);
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD0,
+ splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD1,
+ splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD2,
+ splt->contents + h->plt.offset + 8);
+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD3,
+ splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, PLT_PIC_ENTRY_WORD4,
+ splt->contents + h->plt.offset + 16);
+ bfd_put_32 (output_bfd, 0+(relative_offset << 16),
+ splt->contents + h->plt.offset + 20);
+ bfd_put_32 (output_bfd, got_offset,
+ splt->contents + h->plt.offset + 24);
+ }
+ /* Insert offset into reloc. table here. */
+ bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rela),
+ splt->contents + h->plt.offset + 28);
+ /* Fill in the entry in the .rela.plt section. */
+ rela.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_390_JMP_SLOT);
+ rela.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela,
+ ((Elf32_External_Rela *) srela->contents
+ + plt_index ));
+
+ /* Fill in the entry in the global offset table.
+ Points to instruction after GOT offset. */
+ bfd_put_32 (output_bfd,
+ (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset
+ + 12),
+ sgot->contents + got_offset);
+
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ }
+ }
+
+ if (h->got.offset != (bfd_vma) -1)
+ {
+ asection *sgot;
+ asection *srela;
+ Elf_Internal_Rela rela;
+
+ /* This symbol has an entry in the global offset table. Set it
+ up. */
+
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ srela = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (sgot != NULL && srela != NULL);
+
+ rela.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + (h->got.offset &~ 1));
+
+ /* If this is a 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 (! elf_hash_table (info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ {
+ rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE);
+ rela.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+ else
+ {
+ BFD_ASSERT((h->got.offset & 1) == 0);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_390_GLOB_DAT);
+ rela.r_addend = 0;
+ }
+
+ bfd_elf32_swap_reloca_out (output_bfd, &rela,
+ ((Elf32_External_Rela *) srela->contents
+ + srela->reloc_count));
+ ++srela->reloc_count;
+ }
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ {
+ asection *s;
+ Elf_Internal_Rela rela;
+
+ /* This symbols needs a copy reloc. Set it up. */
+
+ BFD_ASSERT (h->dynindx != -1
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak));
+
+
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ ".rela.bss");
+ BFD_ASSERT (s != NULL);
+
+ rela.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rela.r_info = ELF32_R_INFO (h->dynindx, R_390_COPY);
+ rela.r_addend = 0;
+ bfd_elf32_swap_reloca_out (output_bfd, &rela,
+ ((Elf32_External_Rela *) s->contents
+ + s->reloc_count));
+ ++s->reloc_count;
+ }
+
+ /* Mark some specially defined symbols as absolute. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
+ || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ sym->st_shndx = SHN_ABS;
+
+ return true;
+}
+
+/* Finish up the dynamic sections. */
+
+static boolean
+elf_s390_finish_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *dynobj;
+ asection *sdyn;
+ asection *sgot;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (sgot != NULL);
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ asection *splt;
+ Elf32_External_Dyn *dyncon, *dynconend;
+
+ BFD_ASSERT (sdyn != NULL);
+
+ dyncon = (Elf32_External_Dyn *) sdyn->contents;
+ dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+ const char *name;
+ asection *s;
+
+ bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ default:
+ break;
+
+ case DT_PLTGOT:
+ name = ".got";
+ goto get_vma;
+ case DT_JMPREL:
+ name = ".rela.plt";
+ get_vma:
+ s = bfd_get_section_by_name(output_bfd, name);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->vma;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_PLTRELSZ:
+ s = bfd_get_section_by_name (output_bfd, ".rela.plt");
+ BFD_ASSERT (s != NULL);
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val = s->_cooked_size;
+ else
+ dyn.d_un.d_val = s->_raw_size;
+ bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+ }
+ }
+
+ /* Fill in the special first entry in the procedure linkage table. */
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ if (splt && splt->_raw_size > 0)
+ {
+ memset (splt->contents, 0, PLT_FIRST_ENTRY_SIZE);
+ if (info->shared)
+ {
+ bfd_put_32 (output_bfd, PLT_PIC_FIRST_ENTRY_WORD0,
+ splt->contents );
+ bfd_put_32 (output_bfd, PLT_PIC_FIRST_ENTRY_WORD1,
+ splt->contents +4 );
+ bfd_put_32 (output_bfd, PLT_PIC_FIRST_ENTRY_WORD2,
+ splt->contents +8 );
+ bfd_put_32 (output_bfd, PLT_PIC_FIRST_ENTRY_WORD3,
+ splt->contents +12 );
+ bfd_put_32 (output_bfd, PLT_PIC_FIRST_ENTRY_WORD4,
+ splt->contents +16 );
+ }
+ else
+ {
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD0,
+ splt->contents );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD1,
+ splt->contents +4 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD2,
+ splt->contents +8 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD3,
+ splt->contents +12 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD4,
+ splt->contents +16 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD5,
+ splt->contents +20 );
+ bfd_put_32 (output_bfd,
+ sgot->output_section->vma + sgot->output_offset,
+ splt->contents + 24);
+ }
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ }
+
+ }
+
+ /* Set the first entry in the global offset table to the address of
+ the dynamic section. */
+ if (sgot->_raw_size > 0)
+ {
+ if (sdyn == NULL)
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents);
+ else
+ bfd_put_32 (output_bfd,
+ sdyn->output_section->vma + sdyn->output_offset,
+ sgot->contents);
+
+ /* One entry for shared object struct ptr. */
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 4);
+ /* One entry for _dl_runtime_resolve. */
+ bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
+ }
+
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4;
+
+ return true;
+}
+
+static boolean
+elf_s390_object_p (abfd)
+ bfd *abfd;
+{
+ return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_esa);
+}
+
+#define TARGET_BIG_SYM bfd_elf32_s390_vec
+#define TARGET_BIG_NAME "elf32-s390"
+#define ELF_ARCH bfd_arch_s390
+#define ELF_MACHINE_CODE EM_S390
+#define ELF_MACHINE_ALT1 EM_S390_OLD
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf_backend_can_gc_sections 1
+#define elf_backend_want_got_plt 1
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_got_header_size 12
+#define elf_backend_plt_header_size PLT_ENTRY_SIZE
+
+#define elf_info_to_howto elf_s390_info_to_howto
+
+#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link
+#define bfd_elf32_bfd_is_local_label_name elf_s390_is_local_label_name
+#define bfd_elf32_bfd_link_hash_table_create elf_s390_link_hash_table_create
+#define bfd_elf32_bfd_reloc_type_lookup elf_s390_reloc_type_lookup
+
+#define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol
+#define elf_backend_check_relocs elf_s390_check_relocs
+#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections
+#define elf_backend_finish_dynamic_sections elf_s390_finish_dynamic_sections
+#define elf_backend_finish_dynamic_symbol elf_s390_finish_dynamic_symbol
+#define elf_backend_gc_mark_hook elf_s390_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf_s390_gc_sweep_hook
+#define elf_backend_relocate_section elf_s390_relocate_section
+#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
+
+#define elf_backend_object_p elf_s390_object_p
+
+#include "elf32-target.h"
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
new file mode 100644
index 0000000..9296a26
--- /dev/null
+++ b/bfd/elf64-s390.c
@@ -0,0 +1,2178 @@
+/* IBM S/390-specific support for 64-bit ELF
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+
+static reloc_howto_type *elf_s390_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+static void elf_s390_info_to_howto
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+static boolean elf_s390_is_local_label_name PARAMS ((bfd *, const char *));
+static struct bfd_hash_entry *elf_s390_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct bfd_link_hash_table *elf_s390_link_hash_table_create
+ PARAMS ((bfd *));
+static boolean elf_s390_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+static boolean elf_s390_adjust_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static boolean elf_s390_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static boolean elf_s390_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static boolean elf_s390_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
+static boolean elf_s390_finish_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+#define USE_RELA 1 /* We want RELA relocations, not REL. */
+
+#include "elf/s390.h"
+
+/* In case we're on a 32-bit machine, construct a 64-bit "-1" value
+ from smaller values. Start with zero, widen, *then* decrement. */
+#define MINUS_ONE (((bfd_vma)0) - 1)
+
+/* The relocation "howto" table. */
+static reloc_howto_type elf_howto_table[] =
+{
+ HOWTO (R_390_NONE, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_390_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ HOWTO(R_390_8, 0, 0, 8, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_8", false, 0,0x000000ff, false),
+ HOWTO(R_390_12, 0, 1, 12, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_12", false, 0,0x00000fff, false),
+ HOWTO(R_390_16, 0, 1, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_16", false, 0,0x0000ffff, false),
+ HOWTO(R_390_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_32", false, 0,0xffffffff, false),
+ HOWTO(R_390_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32", false, 0,0xffffffff, true),
+ HOWTO(R_390_GOT12, 0, 1, 12, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_390_GOT12", false, 0,0x00000fff, false),
+ HOWTO(R_390_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT32", false, 0,0xffffffff, false),
+ HOWTO(R_390_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32", false, 0,0xffffffff, true),
+ HOWTO(R_390_COPY, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_COPY", false, 0,MINUS_ONE, false),
+ HOWTO(R_390_GLOB_DAT, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GLOB_DAT",false, 0,MINUS_ONE, false),
+ HOWTO(R_390_JMP_SLOT, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_JMP_SLOT",false, 0,MINUS_ONE, false),
+ HOWTO(R_390_RELATIVE, 0, 4, 64, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_RELATIVE",false, 0,MINUS_ONE, false),
+ HOWTO(R_390_GOTOFF, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTOFF", false, 0,MINUS_ONE, false),
+ HOWTO(R_390_GOTPC, 0, 4, 64, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPC", false, 0,MINUS_ONE, true),
+ HOWTO(R_390_GOT16, 0, 1, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT16", false, 0,0x0000ffff, false),
+ HOWTO(R_390_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16", false, 0,0x0000ffff, true),
+ HOWTO(R_390_PC16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC16DBL", false, 0,0x0000ffff, true),
+ HOWTO(R_390_PLT16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT16DBL", false, 0,0x0000ffff, true),
+ HOWTO(R_390_PC32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC32DBL", false, 0,0xffffffff, true),
+ HOWTO(R_390_PLT32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT32DBL", false, 0,0xffffffff, true),
+ HOWTO(R_390_GOTPCDBL, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTPCDBL", false, 0,MINUS_ONE, true),
+ HOWTO(R_390_64, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_64", false, 0,MINUS_ONE, false),
+ HOWTO(R_390_PC64, 0, 4, 64, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PC64", false, 0,MINUS_ONE, true),
+ HOWTO(R_390_GOT64, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOT64", false, 0,MINUS_ONE, false),
+ HOWTO(R_390_PLT64, 0, 4, 64, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_PLT64", false, 0,MINUS_ONE, true),
+ HOWTO(R_390_GOTENT, 1, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_390_GOTENT", false, 0,MINUS_ONE, true),
+};
+
+/* GNU extension to record C++ vtable hierarchy. */
+static reloc_howto_type elf64_s390_vtinherit_howto =
+ HOWTO (R_390_GNU_VTINHERIT, 0,4,0,false,0,complain_overflow_dont, NULL, "R_390_GNU_VTINHERIT", false,0, 0, false);
+static reloc_howto_type elf64_s390_vtentry_howto =
+ HOWTO (R_390_GNU_VTENTRY, 0,4,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_390_GNU_VTENTRY", false,0,0, false);
+
+static reloc_howto_type *
+elf_s390_reloc_type_lookup (abfd, code)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_reloc_code_real_type code;
+{
+ switch (code) {
+ case BFD_RELOC_NONE:
+ return &elf_howto_table[(int) R_390_NONE];
+ case BFD_RELOC_8:
+ return &elf_howto_table[(int) R_390_8];
+ case BFD_RELOC_390_12:
+ return &elf_howto_table[(int) R_390_12];
+ case BFD_RELOC_16:
+ return &elf_howto_table[(int) R_390_16];
+ case BFD_RELOC_32:
+ return &elf_howto_table[(int) R_390_32];
+ case BFD_RELOC_CTOR:
+ return &elf_howto_table[(int) R_390_32];
+ case BFD_RELOC_32_PCREL:
+ return &elf_howto_table[(int) R_390_PC32];
+ case BFD_RELOC_390_GOT12:
+ return &elf_howto_table[(int) R_390_GOT12];
+ case BFD_RELOC_32_GOT_PCREL:
+ return &elf_howto_table[(int) R_390_GOT32];
+ case BFD_RELOC_390_PLT32:
+ return &elf_howto_table[(int) R_390_PLT32];
+ case BFD_RELOC_390_COPY:
+ return &elf_howto_table[(int) R_390_COPY];
+ case BFD_RELOC_390_GLOB_DAT:
+ return &elf_howto_table[(int) R_390_GLOB_DAT];
+ case BFD_RELOC_390_JMP_SLOT:
+ return &elf_howto_table[(int) R_390_JMP_SLOT];
+ case BFD_RELOC_390_RELATIVE:
+ return &elf_howto_table[(int) R_390_RELATIVE];
+ case BFD_RELOC_32_GOTOFF:
+ return &elf_howto_table[(int) R_390_GOTOFF];
+ case BFD_RELOC_390_GOTPC:
+ return &elf_howto_table[(int) R_390_GOTPC];
+ case BFD_RELOC_390_GOT16:
+ return &elf_howto_table[(int) R_390_GOT16];
+ case BFD_RELOC_16_PCREL:
+ return &elf_howto_table[(int) R_390_PC16];
+ case BFD_RELOC_390_PC16DBL:
+ return &elf_howto_table[(int) R_390_PC16DBL];
+ case BFD_RELOC_390_PLT16DBL:
+ return &elf_howto_table[(int) R_390_PLT16DBL];
+ case BFD_RELOC_VTABLE_INHERIT:
+ return &elf64_s390_vtinherit_howto;
+ case BFD_RELOC_VTABLE_ENTRY:
+ return &elf64_s390_vtentry_howto;
+ case BFD_RELOC_390_PC32DBL:
+ return &elf_howto_table[(int) R_390_PC32DBL];
+ case BFD_RELOC_390_PLT32DBL:
+ return &elf_howto_table[(int) R_390_PLT32DBL];
+ case BFD_RELOC_390_GOTPCDBL:
+ return &elf_howto_table[(int) R_390_GOTPCDBL];
+ case BFD_RELOC_64:
+ return &elf_howto_table[(int) R_390_64];
+ case BFD_RELOC_64_PCREL:
+ return &elf_howto_table[(int) R_390_PC64];
+ case BFD_RELOC_390_GOT64:
+ return &elf_howto_table[(int) R_390_GOT64];
+ case BFD_RELOC_390_PLT64:
+ return &elf_howto_table[(int) R_390_PLT64];
+ case BFD_RELOC_390_GOTENT:
+ return &elf_howto_table[(int) R_390_GOTENT];
+ default:
+ break;
+ }
+ return 0;
+}
+
+/* We need to use ELF64_R_TYPE so we have our own copy of this function,
+ and elf64-s390.c has its own copy. */
+
+static void
+elf_s390_info_to_howto (abfd, cache_ptr, dst)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr;
+ Elf_Internal_Rela *dst;
+{
+ switch (ELF64_R_TYPE(dst->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ cache_ptr->howto = &elf64_s390_vtinherit_howto;
+ break;
+
+ case R_390_GNU_VTENTRY:
+ cache_ptr->howto = &elf64_s390_vtentry_howto;
+ break;
+
+ default:
+ BFD_ASSERT (ELF64_R_TYPE(dst->r_info) < (unsigned int) R_390_max);
+ cache_ptr->howto = &elf_howto_table[ELF64_R_TYPE(dst->r_info)];
+ }
+}
+
+static boolean
+elf_s390_is_local_label_name (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (name[0] == '.' && (name[1] == 'X' || name[1] == 'L'))
+ return true;
+
+ return _bfd_elf_is_local_label_name (abfd, name);
+}
+
+/* Functions for the 390 ELF linker. */
+
+/* The name of the dynamic interpreter. This is put in the .interp
+ section. */
+
+#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+
+/* The nop opcode we use. */
+
+#define s390_NOP 0x07070707
+
+
+/* The size in bytes of the first entry in the procedure linkage table. */
+#define PLT_FIRST_ENTRY_SIZE 32
+/* The size in bytes of an entry in the procedure linkage table. */
+#define PLT_ENTRY_SIZE 32
+
+#define GOT_ENTRY_SIZE 8
+
+/* The first three entries in a procedure linkage table are reserved,
+ and the initial contents are unimportant (we zero them out).
+ Subsequent entries look like this. See the SVR4 ABI 386
+ supplement to see how this works. */
+
+/* For the s390, simple addr offset can only be 0 - 4096.
+ To use the full 16777216 TB address space, several instructions
+ are needed to load an address in a register and execute
+ a branch( or just saving the address)
+
+ Furthermore, only r 0 and 1 are free to use!!! */
+
+/* The first 3 words in the GOT are then reserved.
+ Word 0 is the address of the dynamic table.
+ Word 1 is a pointer to a structure describing the object
+ Word 2 is used to point to the loader entry address.
+
+ The code for PLT entries looks like this:
+
+ The GOT holds the address in the PLT to be executed.
+ The loader then gets:
+ 24(15) = Pointer to the structure describing the object.
+ 28(15) = Offset in symbol table
+ The loader must then find the module where the function is
+ and insert the address in the GOT.
+
+ PLT1: LARL 1,<fn>@GOTENT # 6 bytes Load address of GOT entry in r1
+ LG 1,0(1) # 6 bytes Load address from GOT in r1
+ BCR 15,1 # 2 bytes Jump to address
+ RET1: BASR 1,0 # 2 bytes Return from GOT 1st time
+ LGF 1,12(1) # 6 bytes Load offset in symbl table in r1
+ BRCL 15,-x # 6 bytes Jump to start of PLT
+ .long ? # 4 bytes offset into symbol table
+
+ Total = 32 bytes per PLT entry
+ Fixup at offset 2: relative address to GOT entry
+ Fixup at offset 22: relative branch to PLT0
+ Fixup at offset 28: 32 bit offset into symbol table
+
+ A 32 bit offset into the symbol table is enough. It allows for symbol
+ tables up to a size of 2 gigabyte. A single dynamic object (the main
+ program, any shared library) is limited to 4GB in size and I want to see
+ the program that manages to have a symbol table of more than 2 GB with a
+ total size of at max 4 GB. */
+
+#define PLT_ENTRY_WORD0 0xc0100000
+#define PLT_ENTRY_WORD1 0x0000e310
+#define PLT_ENTRY_WORD2 0x10000004
+#define PLT_ENTRY_WORD3 0x07f10d10
+#define PLT_ENTRY_WORD4 0xe310100c
+#define PLT_ENTRY_WORD5 0x0014c0f4
+#define PLT_ENTRY_WORD6 0x00000000
+#define PLT_ENTRY_WORD7 0x00000000
+
+/* The first PLT entry pushes the offset into the symbol table
+ from R1 onto the stack at 8(15) and the loader object info
+ at 12(15), loads the loader address in R1 and jumps to it. */
+
+/* The first entry in the PLT:
+
+ PLT0:
+ STG 1,56(15) # r1 contains the offset into the symbol table
+ LARL 1,_GLOBAL_OFFSET_TABLE # load address of global offset table
+ MVC 48(8,15),8(1) # move loader ino (object struct address) to stack
+ LG 1,16(1) # get entry address of loader
+ BCR 15,1 # jump to loader
+
+ Fixup at offset 8: relative address to start of GOT. */
+
+#define PLT_FIRST_ENTRY_WORD0 0xe310f038
+#define PLT_FIRST_ENTRY_WORD1 0x0024c010
+#define PLT_FIRST_ENTRY_WORD2 0x00000000
+#define PLT_FIRST_ENTRY_WORD3 0xd207f030
+#define PLT_FIRST_ENTRY_WORD4 0x1008e310
+#define PLT_FIRST_ENTRY_WORD5 0x10100004
+#define PLT_FIRST_ENTRY_WORD6 0x07f10700
+#define PLT_FIRST_ENTRY_WORD7 0x07000700
+
+/* The s390 linker needs to keep track of the number of relocs that it
+ decides to copy in check_relocs for each symbol. This is so that
+ it can discard PC relative relocs if it doesn't need them when
+ linking with -Bsymbolic. We store the information in a field
+ extending the regular ELF linker hash table. */
+
+/* This structure keeps track of the number of PC relative relocs we
+ have copied for a given symbol. */
+
+struct elf_s390_pcrel_relocs_copied
+{
+ /* Next section. */
+ struct elf_s390_pcrel_relocs_copied *next;
+ /* A section in dynobj. */
+ asection *section;
+ /* Number of relocs copied in this section. */
+ bfd_size_type count;
+};
+
+/* s390 ELF linker hash entry. */
+
+struct elf_s390_link_hash_entry
+{
+ struct elf_link_hash_entry root;
+
+ /* Number of PC relative relocs copied for this symbol. */
+ struct elf_s390_pcrel_relocs_copied *pcrel_relocs_copied;
+};
+
+/* s390 ELF linker hash table. */
+
+struct elf_s390_link_hash_table
+{
+ struct elf_link_hash_table root;
+};
+
+/* Declare this now that the above structures are defined. */
+
+static boolean elf_s390_discard_copies
+ PARAMS ((struct elf_s390_link_hash_entry *, PTR));
+
+/* Traverse an s390 ELF linker hash table. */
+
+#define elf_s390_link_hash_traverse(table, func, info) \
+ (elf_link_hash_traverse \
+ (&(table)->root, \
+ (boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
+ (info)))
+
+/* Get the s390 ELF linker hash table from a link_info structure. */
+
+#define elf_s390_hash_table(p) \
+ ((struct elf_s390_link_hash_table *) ((p)->hash))
+
+/* Create an entry in an s390 ELF linker hash table. */
+
+static struct bfd_hash_entry *
+elf_s390_link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ struct elf_s390_link_hash_entry *ret =
+ (struct elf_s390_link_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct elf_s390_link_hash_entry *) NULL)
+ ret = ((struct elf_s390_link_hash_entry *)
+ bfd_hash_allocate (table,
+ sizeof (struct elf_s390_link_hash_entry)));
+ if (ret == (struct elf_s390_link_hash_entry *) NULL)
+ return (struct bfd_hash_entry *) ret;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct elf_s390_link_hash_entry *)
+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
+ table, string));
+ if (ret != (struct elf_s390_link_hash_entry *) NULL)
+ {
+ ret->pcrel_relocs_copied = NULL;
+ }
+
+ return (struct bfd_hash_entry *) ret;
+}
+
+/* Create an s390 ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+elf_s390_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct elf_s390_link_hash_table *ret;
+
+ ret = ((struct elf_s390_link_hash_table *)
+ bfd_alloc (abfd, sizeof (struct elf_s390_link_hash_table)));
+ if (ret == (struct elf_s390_link_hash_table *) NULL)
+ return NULL;
+
+ if (! _bfd_elf_link_hash_table_init (&ret->root, abfd,
+ elf_s390_link_hash_newfunc))
+ {
+ bfd_release (abfd, ret);
+ return NULL;
+ }
+
+ return &ret->root.root;
+}
+
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table or procedure linkage
+ table. */
+
+static boolean
+elf_s390_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;
+ asection *sgot;
+ asection *srelgot;
+ asection *sreloc;
+
+ if (info->relocateable)
+ return true;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_offsets (abfd);
+
+ sgot = NULL;
+ srelgot = NULL;
+ sreloc = NULL;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ /* Some relocs require a global offset table. */
+ if (dynobj == NULL)
+ {
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOT64:
+ case R_390_GOTOFF:
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ case R_390_GOTENT:
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return false;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOT64:
+ case R_390_GOTENT:
+ /* This symbol requires a global offset table entry. */
+
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+
+ if (srelgot == NULL
+ && (h != NULL || info->shared))
+ {
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (srelgot == NULL)
+ {
+ srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, srelgot,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, srelgot, 2))
+ return false;
+ }
+ }
+
+ if (h != NULL)
+ {
+ if (h->got.refcount == -1)
+ {
+ h->got.refcount = 1;
+
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (h->dynindx == -1)
+ {
+ if (! bfd_elf64_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+
+ sgot->_raw_size += 8;
+ srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ else
+ h->got.refcount += 1;
+ }
+ else
+ {
+ /* This is a global offset table entry for a local symbol. */
+ if (local_got_refcounts == NULL)
+ {
+ size_t size;
+
+ size = symtab_hdr->sh_info * sizeof (bfd_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;
+
+ sgot->_raw_size += 8;
+ if (info->shared)
+ {
+ /* If we are generating a shared object, we need to
+ output a R_390_RELATIVE reloc so that the dynamic
+ linker can adjust this GOT entry. */
+ srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ }
+ else
+ local_got_refcounts[r_symndx] += 1;
+
+ }
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32:
+ case R_390_PLT32DBL:
+ case R_390_PLT64:
+ /* This symbol requires a procedure linkage table entry. We
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code which is
+ never referenced by a dynamic object, in which case we
+ don't need to generate a procedure linkage table entry
+ after all. */
+
+ /* If this is a local symbol, we resolve it directly without
+ creating a procedure linkage table entry. */
+ if (h == NULL)
+ continue;
+
+ 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_390_8:
+ case R_390_16:
+ case R_390_32:
+ case R_390_64:
+ case R_390_PC16:
+ case R_390_PC16DBL:
+ case R_390_PC32:
+ case R_390_PC32DBL:
+ case R_390_PC64:
+ if (h != NULL)
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
+ /* If we are creating a shared library, and this is a reloc
+ against a global symbol, or a non PC relative reloc
+ against a local symbol, then we need to copy the reloc
+ into the shared library. However, if we are linking with
+ -Bsymbolic, we do not need to copy a reloc against a
+ global symbol which is defined in an object we are
+ including in the link (i.e., DEF_REGULAR is set). At
+ this point we have not seen all the input files, so it is
+ possible that DEF_REGULAR is not set now but will be set
+ later (it is never cleared). We account for that
+ possibility below by storing information in the
+ pcrel_relocs_copied field of the hash table entry. */
+ if (info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && (ELF64_R_TYPE (rel->r_info) == R_390_8
+ || ELF64_R_TYPE (rel->r_info) == R_390_16
+ || ELF64_R_TYPE (rel->r_info) == R_390_32
+ || ELF64_R_TYPE (rel->r_info) == R_390_64
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ {
+ /* When creating a shared object, we must copy these
+ reloc types into the output file. We create a reloc
+ section in dynobj and make room for this reloc. */
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (abfd,
+ elf_elfheader (abfd)->e_shstrndx,
+ elf_section_data (sec)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (abfd, sec),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ if (sreloc == NULL)
+ {
+ flagword flags;
+
+ sreloc = bfd_make_section (dynobj, name);
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ if ((sec->flags & SEC_ALLOC) != 0)
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (sreloc == NULL
+ || ! bfd_set_section_flags (dynobj, sreloc, flags)
+ || ! bfd_set_section_alignment (dynobj, sreloc, 2))
+ return false;
+ }
+ }
+
+ sreloc->_raw_size += sizeof (Elf64_External_Rela);
+
+ /* 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 elf64_s390 linker
+ hash table, which means that h is really a pointer to
+ an elf64_s390_link_hash_entry. */
+ if (h != NULL
+ && (ELF64_R_TYPE (rel->r_info) == R_390_PC16 ||
+ ELF64_R_TYPE (rel->r_info) == R_390_PC16DBL ||
+ ELF64_R_TYPE (rel->r_info) == R_390_PC32 ||
+ ELF64_R_TYPE (rel->r_info) == R_390_PC32DBL ||
+ ELF64_R_TYPE (rel->r_info) == R_390_PC64))
+ {
+ struct elf_s390_link_hash_entry *eh;
+ struct elf_s390_pcrel_relocs_copied *p;
+
+ eh = (struct elf_s390_link_hash_entry *) h;
+
+ for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
+ if (p->section == sreloc)
+ break;
+
+ if (p == NULL)
+ {
+ p = ((struct elf_s390_pcrel_relocs_copied *)
+ bfd_alloc (dynobj, sizeof *p));
+ if (p == NULL)
+ return false;
+ p->next = eh->pcrel_relocs_copied;
+ eh->pcrel_relocs_copied = p;
+ p->section = sreloc;
+ p->count = 0;
+ }
+
+ ++p->count;
+ }
+ }
+
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_390_GNU_VTINHERIT:
+ if (!_bfd_elf64_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ return false;
+ break;
+
+ /* This relocation describes which C++ vtable entries are actually
+ used. Record for later use during GC. */
+ case R_390_GNU_VTENTRY:
+ if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return true;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+elf_s390_gc_mark_hook (abfd, info, rel, h, sym)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ Elf_Internal_Rela *rel;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ if (h != NULL)
+ {
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ case R_390_GNU_VTENTRY:
+ break;
+
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (abfd)
+ && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
+ && sym->st_shndx != SHN_COMMON))
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+ }
+
+ return NULL;
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static boolean
+elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ 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, ".rela.got");
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOT64:
+ case R_390_GOTOFF:
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ case R_390_GOTENT:
+ r_symndx = ELF64_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 -= 8;
+ srelgot->_raw_size -= sizeof (Elf64_External_Rela);
+ }
+ }
+ }
+ 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 -= 8;
+ if (info->shared)
+ srelgot->_raw_size -= sizeof (Elf64_External_Rela);
+ }
+ }
+ }
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32:
+ case R_390_PLT32DBL:
+ case R_390_PLT64:
+ r_symndx = ELF64_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;
+}
+
+/* Adjust a symbol defined by a dynamic object and referenced by a
+ regular object. The current definition is in some section of the
+ dynamic object, but we're not including those sections. We have to
+ change the definition to something the rest of the link can
+ understand. */
+
+static boolean
+elf_s390_adjust_dynamic_symbol (info, h)
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+{
+ bfd *dynobj;
+ asection *s;
+ unsigned int power_of_two;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (dynobj != NULL
+ && ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT)
+ || h->weakdef != NULL
+ || ((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_REF_REGULAR) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)));
+
+ /* If this is a function, put it in the procedure linkage table. We
+ will fill in the contents of the procedure linkage table later
+ (although we could actually do it here). */
+ 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)
+ || (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. */
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ return true;
+ }
+
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (h->dynindx == -1)
+ {
+ if (! bfd_elf64_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+
+ s = bfd_get_section_by_name (dynobj, ".plt");
+ BFD_ASSERT (s != NULL);
+
+
+ /* The first entry in .plt is reserved. */
+ if (s->_raw_size == 0)
+ s->_raw_size = PLT_FIRST_ENTRY_SIZE;
+
+ /* If this symbol is not defined in a regular file, and we are
+ not generating a shared library, then set the symbol to this
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+ }
+
+ h->plt.offset = s->_raw_size;
+
+ /* Make room for this entry. */
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* We also need to make an entry in the .got.plt section, which
+ will be placed in the .got section by the linker script. */
+ s = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size += GOT_ENTRY_SIZE;
+
+ /* We also need to make an entry in the .rela.plt section. */
+ s = bfd_get_section_by_name (dynobj, ".rela.plt");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size += sizeof (Elf64_External_Rela);
+
+ return true;
+ }
+
+ /* If this is a weak symbol, and there is a real definition, the
+ processor independent code will have arranged for us to see the
+ real definition first, and we can just use the same value. */
+ if (h->weakdef != NULL)
+ {
+ BFD_ASSERT (h->weakdef->root.type == bfd_link_hash_defined
+ || h->weakdef->root.type == bfd_link_hash_defweak);
+ h->root.u.def.section = h->weakdef->root.u.def.section;
+ h->root.u.def.value = h->weakdef->root.u.def.value;
+ return true;
+ }
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+
+ /* If we are creating a shared library, we must presume that the
+ only references to the symbol are via the global offset table.
+ For such cases we need not do anything here; the relocations will
+ be handled correctly by relocate_section. */
+ if (info->shared)
+ return true;
+
+ /* 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 = bfd_get_section_by_name (dynobj, ".dynbss");
+ BFD_ASSERT (s != NULL);
+
+ /* We must generate a R_390_COPY reloc to tell the dynamic linker
+ to copy the initial value out of the dynamic object and into the
+ runtime process image. We need to remember the offset into the
+ .rel.bss section we are going to use. */
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ {
+ asection *srel;
+
+ srel = bfd_get_section_by_name (dynobj, ".rela.bss");
+ BFD_ASSERT (srel != NULL);
+ srel->_raw_size += sizeof (Elf64_External_Rela);
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_COPY;
+ }
+
+ /* We need to figure out the alignment required for this symbol. I
+ have no idea how ELF linkers handle this. */
+ power_of_two = bfd_log2 (h->size);
+ if (power_of_two > 3)
+ power_of_two = 3;
+
+ /* Apply the required alignment. */
+ s->_raw_size = BFD_ALIGN (s->_raw_size,
+ (bfd_size_type) (1 << power_of_two));
+ if (power_of_two > bfd_get_section_alignment (dynobj, s))
+ {
+ if (! bfd_set_section_alignment (dynobj, s, power_of_two))
+ return false;
+ }
+
+ /* Define the symbol as being at this point in the section. */
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->_raw_size;
+
+ /* Increment the section size to make room for the symbol. */
+ s->_raw_size += h->size;
+
+ return true;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static boolean
+elf_s390_size_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *dynobj;
+ asection *s;
+ boolean reltext;
+ boolean relocs;
+ boolean plt;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (! info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+ else
+ {
+ /* We may have created entries in the .rela.got section.
+ However, if we are not creating the dynamic sections, we will
+ not actually use these entries. Reset the size of .rela.got,
+ which will cause it to get stripped from the output file
+ below. */
+ s = bfd_get_section_by_name (dynobj, ".rela.got");
+ if (s != NULL)
+ s->_raw_size = 0;
+ }
+
+ /* If this is a -Bsymbolic shared link, then we need to discard all
+ PC relative relocs against symbols defined in a regular object.
+ We allocated space for them in the check_relocs routine, but we
+ will not fill them in in the relocate_section routine. */
+ if (info->shared)
+ elf_s390_link_hash_traverse (elf_s390_hash_table (info),
+ elf_s390_discard_copies,
+ (PTR) info);
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ plt = false;
+ reltext = false;
+ relocs = false;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ const char *name;
+ boolean strip;
+
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ /* It's OK to base decisions on the section name, because none
+ of the dynobj section names depend upon the input files. */
+ name = bfd_get_section_name (dynobj, s);
+
+ strip = false;
+
+ if (strcmp (name, ".plt") == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ strip = true;
+ }
+ else
+ {
+ /* Remember whether there is a PLT. */
+ plt = true;
+ }
+ }
+ else if (strncmp (name, ".rela", 5) == 0)
+ {
+ if (s->_raw_size == 0)
+ {
+ /* If we don't need this section, strip it from the
+ output file. This is to handle .rela.bss and
+ .rel.plt. We must create it in
+ create_dynamic_sections, because it must be created
+ before the linker maps input sections to output
+ sections. The linker does that before
+ adjust_dynamic_symbol is called, and it is that
+ function which decides whether anything needs to go
+ into these sections. */
+ strip = true;
+ }
+ else
+ {
+ asection *target;
+
+ /* Remember whether there are any reloc sections other
+ than .rela.plt. */
+ if (strcmp (name, ".rela.plt") != 0)
+ {
+ const char *outname;
+
+ relocs = true;
+
+ /* If this relocation section applies to a read only
+ section, then we probably need a DT_TEXTREL
+ entry. The entries in the .rela.plt section
+ really apply to the .got section, which we
+ created ourselves and so know is not readonly. */
+ outname = bfd_get_section_name (output_bfd,
+ s->output_section);
+ target = bfd_get_section_by_name (output_bfd, outname + 5);
+ if (target != NULL
+ && (target->flags & SEC_READONLY) != 0
+ && (target->flags & SEC_ALLOC) != 0)
+ reltext = true;
+ }
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ s->reloc_count = 0;
+ }
+ }
+ else if (strncmp (name, ".got", 4) != 0)
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ if (strip)
+ {
+ _bfd_strip_section_from_output (info, s);
+ continue;
+ }
+
+ /* Allocate memory for the section contents. */
+ s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size);
+ if (s->contents == NULL && s->_raw_size != 0)
+ return false;
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in elf_s390_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_elf64_add_dynamic_entry (info, DT_DEBUG, 0))
+ return false;
+ }
+
+ if (plt)
+ {
+ if (! bfd_elf64_add_dynamic_entry (info, DT_PLTGOT, 0)
+ || ! bfd_elf64_add_dynamic_entry (info, DT_PLTRELSZ, 0)
+ || ! bfd_elf64_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
+ || ! bfd_elf64_add_dynamic_entry (info, DT_JMPREL, 0))
+ return false;
+ }
+
+ if (relocs)
+ {
+ if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0)
+ || ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0)
+ || ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT,
+ sizeof (Elf64_External_Rela)))
+ return false;
+ }
+
+ if (reltext)
+ {
+ if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
+ return false;
+ info->flags |= DF_TEXTREL;
+ }
+ }
+
+ return true;
+}
+
+/* This function is called via elf64_s390_link_hash_traverse if we are
+ creating a shared object with -Bsymbolic. It discards the space
+ allocated to copy PC relative relocs against symbols which are
+ defined in regular objects. We allocated space for them in the
+ check_relocs routine, but we won't fill them in in the
+ relocate_section routine. */
+
+/*ARGSUSED*/
+static boolean
+elf_s390_discard_copies (h, inf)
+ struct elf_s390_link_hash_entry *h;
+ PTR inf;
+{
+ struct elf_s390_pcrel_relocs_copied *s;
+ 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 (Elf64_External_Rela);
+ }
+
+ return true;
+}
+/* Relocate a 390 ELF section. */
+
+static boolean
+elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
+ contents, relocs, local_syms, local_sections)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ bfd *input_bfd;
+ asection *input_section;
+ bfd_byte *contents;
+ Elf_Internal_Rela *relocs;
+ Elf_Internal_Sym *local_syms;
+ asection **local_sections;
+{
+ bfd *dynobj;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_vma *local_got_offsets;
+ asection *sgot;
+ asection *splt;
+ asection *sreloc;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+
+ sgot = NULL;
+ splt = NULL;
+ sreloc = 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;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+
+ r_type = ELF64_R_TYPE (rel->r_info);
+ if (r_type == R_390_GNU_VTINHERIT
+ || r_type == R_390_GNU_VTENTRY)
+ continue;
+ if (r_type < 0 || r_type >= (int) R_390_max)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ howto = elf_howto_table + r_type;
+
+ r_symndx = ELF64_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. */
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ }
+ else
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ if ((r_type == R_390_GOTPC
+ || r_type == R_390_GOTPCDBL)
+ || ((r_type == R_390_PLT16DBL ||
+ r_type == R_390_PLT32 ||
+ r_type == R_390_PLT32DBL ||
+ r_type == R_390_PLT64)
+ && splt != NULL
+ && h->plt.offset != (bfd_vma) -1)
+ || ((r_type == R_390_GOT12 ||
+ r_type == R_390_GOT16 ||
+ r_type == R_390_GOT32 ||
+ r_type == R_390_GOT64 ||
+ r_type == R_390_GOTENT)
+ && elf_hash_table (info)->dynamic_sections_created
+ && (! info->shared
+ || (! info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ || (info->shared
+ && ((! info->symbolic && h->dynindx != -1)
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ && ( r_type == R_390_8 ||
+ r_type == R_390_16 ||
+ r_type == R_390_32 ||
+ r_type == R_390_64 ||
+ r_type == R_390_PC16 ||
+ r_type == R_390_PC16DBL ||
+ r_type == R_390_PC32 ||
+ r_type == R_390_PC32DBL ||
+ r_type == R_390_PC64)
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_386_32 relocations in its
+ sections against symbols defined externally
+ in shared libraries. We can't do anything
+ with them here. */
+ || ((input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
+ {
+ /* In these cases, we don't need the relocation
+ value. We check specially because in some
+ obscure cases sec->output_section will be NULL. */
+ relocation = 0;
+ }
+ else if (sec->output_section == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+ bfd_get_filename (input_bfd), h->root.root.string,
+ bfd_get_section_name (input_bfd, input_section));
+ relocation = 0;
+ }
+ else
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ relocation = 0;
+ else if (info->shared && !info->symbolic
+ && !info->no_undefined
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ relocation = 0;
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (!info->shared || info->no_undefined
+ || ELF_ST_VISIBILITY (h->other)))))
+ return false;
+ relocation = 0;
+ }
+ }
+
+ switch (r_type)
+ {
+ case R_390_GOT12:
+ case R_390_GOT16:
+ case R_390_GOT32:
+ case R_390_GOT64:
+ case R_390_GOTENT:
+ /* Relocation is to the entry for this symbol in the global
+ offset table. */
+ BFD_ASSERT (sgot != NULL);
+
+ if (h != NULL)
+ {
+ bfd_vma off;
+
+ off = h->got.offset;
+ BFD_ASSERT (off != (bfd_vma) -1);
+
+ if (! elf_hash_table (info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ {
+ /* This is actually a static link, or it is a
+ -Bsymbolic link and the symbol is defined
+ locally, 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 2, we use the
+ least significant bit to record whether we have
+ initialized it already.
+
+ When doing a dynamic link, we create a .rel.got
+ relocation entry to initialize the value. This
+ is done in the finish_dynamic_symbol routine. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_64 (output_bfd, relocation,
+ sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+ relocation = sgot->output_offset + off;
+ }
+ else
+ {
+ bfd_vma off;
+
+ BFD_ASSERT (local_got_offsets != NULL
+ && local_got_offsets[r_symndx] != (bfd_vma) -1);
+
+ off = local_got_offsets[r_symndx];
+
+ /* The offset must always be a multiple of 8. 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_64 (output_bfd, relocation, sgot->contents + off);
+
+ if (info->shared)
+ {
+ asection *srelgot;
+ Elf_Internal_Rela outrel;
+
+ srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (srelgot != NULL);
+
+ outrel.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + off);
+ outrel.r_info = ELF64_R_INFO (0, R_390_RELATIVE);
+ outrel.r_addend = relocation;
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ (((Elf64_External_Rela *)
+ srelgot->contents)
+ + srelgot->reloc_count));
+ ++srelgot->reloc_count;
+ }
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+
+ relocation = sgot->output_offset + off;
+ }
+
+ /*
+ * For @GOTENT the relocation is against the offset between
+ * the instruction and the symbols entry in the GOT and not
+ * between the start of the GOT and the symbols entry. We
+ * add the vma of the GOT to get the correct value.
+ */
+ if (r_type == R_390_GOTENT)
+ relocation += sgot->output_section->vma;
+
+ break;
+
+ case R_390_GOTOFF:
+ /* Relocation is relative to the start of the global offset
+ table. */
+
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+ /* Note that sgot->output_offset is not involved in this
+ calculation. We always want the start of .got. If we
+ defined _GLOBAL_OFFSET_TABLE in a different way, as is
+ permitted by the ABI, we might have to change this
+ calculation. */
+ relocation -= sgot->output_section->vma;
+
+ break;
+
+ case R_390_GOTPC:
+ case R_390_GOTPCDBL:
+ /* Use global offset table as symbol value. */
+
+ if (sgot == NULL)
+ {
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ BFD_ASSERT (sgot != NULL);
+ }
+
+ relocation = sgot->output_section->vma;
+
+ break;
+
+ case R_390_PLT16DBL:
+ case R_390_PLT32:
+ case R_390_PLT32DBL:
+ case R_390_PLT64:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table. */
+
+ /* Resolve a PLT32 reloc against a local symbol directly,
+ without using the procedure linkage table. */
+ if (h == NULL)
+ break;
+
+ if (h->plt.offset == (bfd_vma) -1 || splt == NULL)
+ {
+ /* We didn't make a PLT entry for this symbol. This
+ happens when statically linking PIC code, or when
+ using -Bsymbolic. */
+ break;
+ }
+
+ relocation = (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset);
+
+ break;
+
+ case R_390_8:
+ case R_390_16:
+ case R_390_32:
+ case R_390_64:
+ case R_390_PC16:
+ case R_390_PC16DBL:
+ case R_390_PC32:
+ case R_390_PC32DBL:
+ case R_390_PC64:
+ if (info->shared
+ && (input_section->flags & SEC_ALLOC) != 0
+ && (r_type == R_390_8
+ || r_type == R_390_16
+ || r_type == R_390_32
+ || r_type == R_390_64
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ {
+ Elf_Internal_Rela outrel;
+ boolean skip, relocate;
+
+ /* When generating a shared object, these relocations
+ are copied into the output file to be resolved at run
+ time. */
+
+ if (sreloc == NULL)
+ {
+ const char *name;
+
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd,
+ elf_elfheader (input_bfd)->e_shstrndx,
+ elf_section_data (input_section)->rel_hdr.sh_name));
+ if (name == NULL)
+ return false;
+
+ BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ && strcmp (bfd_get_section_name (input_bfd,
+ input_section),
+ name + 5) == 0);
+
+ sreloc = bfd_get_section_by_name (dynobj, name);
+ BFD_ASSERT (sreloc != NULL);
+ }
+
+ skip = false;
+
+ if (elf_section_data (input_section)->stab_info == NULL)
+ outrel.r_offset = rel->r_offset;
+ else
+ {
+ bfd_vma off;
+
+ off = (_bfd_stab_section_offset
+ (output_bfd, &elf_hash_table (info)->stab_info,
+ input_section,
+ &elf_section_data (input_section)->stab_info,
+ rel->r_offset));
+ if (off == (bfd_vma) -1)
+ skip = true;
+ outrel.r_offset = off;
+ }
+
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ if (skip)
+ {
+ memset (&outrel, 0, sizeof outrel);
+ relocate = false;
+ }
+ else if (r_type == R_390_PC16 ||
+ r_type == R_390_PC16DBL ||
+ r_type == R_390_PC32 ||
+ r_type == R_390_PC32DBL ||
+ r_type == R_390_PC64)
+ {
+ BFD_ASSERT (h != NULL && h->dynindx != -1);
+ relocate = false;
+ outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ else
+ {
+ /* h->dynindx may be -1 if this symbol was marked to
+ become local. */
+ if (h == NULL
+ || ((info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) != 0))
+ {
+ relocate = true;
+ outrel.r_info = ELF64_R_INFO (0, R_390_RELATIVE);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ else
+ {
+ BFD_ASSERT (h->dynindx != -1);
+ relocate = false;
+ outrel.r_info = ELF64_R_INFO (h->dynindx, R_390_64);
+ outrel.r_addend = relocation + rel->r_addend;
+ }
+ }
+
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel,
+ (((Elf64_External_Rela *)
+ sreloc->contents)
+ + sreloc->reloc_count));
+ ++sreloc->reloc_count;
+
+ /* If this reloc is against an external symbol, we do
+ not want to fiddle with the addend. Otherwise, we
+ need to include the symbol value so that it becomes
+ an addend for the dynamic reloc. */
+ if (! relocate)
+ continue;
+ }
+
+ break;
+
+ default:
+ break;
+ }
+
+ r = _bfd_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend);
+
+ if (r != bfd_reloc_ok)
+ {
+ switch (r)
+ {
+ default:
+ case bfd_reloc_outofrange:
+ abort ();
+ case bfd_reloc_overflow:
+ {
+ const char *name;
+
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (name == NULL)
+ return false;
+ if (*name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+ if (! ((*info->callbacks->reloc_overflow)
+ (info, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset)))
+ return false;
+ }
+ break;
+ }
+ }
+ }
+
+ return true;
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static boolean
+elf_s390_finish_dynamic_symbol (output_bfd, info, h, sym)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+ Elf_Internal_Sym *sym;
+{
+ bfd *dynobj;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1)
+ {
+ asection *splt;
+ asection *srela;
+ Elf_Internal_Rela rela;
+ bfd_vma got_offset;
+ bfd_vma plt_index;
+ asection *sgot;
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up. */
+
+ BFD_ASSERT (h->dynindx != -1);
+
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ srela = bfd_get_section_by_name (dynobj, ".rela.plt");
+ BFD_ASSERT (splt != NULL && sgot != NULL && srela != NULL);
+
+ /* Calc. index no.
+ Current offset - size first entry / entry size. */
+ plt_index = (h->plt.offset - PLT_FIRST_ENTRY_SIZE) / PLT_ENTRY_SIZE;
+
+ /* Offset in GOT is PLT index plus GOT headers(3) times 8,
+ addr & GOT addr. */
+ got_offset = (plt_index + 3) * GOT_ENTRY_SIZE;
+
+ /* Fill in the blueprint of a PLT. */
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD0,
+ splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD1,
+ splt->contents + h->plt.offset + 4);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD2,
+ splt->contents + h->plt.offset + 8);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD3,
+ splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD4,
+ splt->contents + h->plt.offset + 16);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD5,
+ splt->contents + h->plt.offset + 20);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD6,
+ splt->contents + h->plt.offset + 24);
+ bfd_put_32 (output_bfd, PLT_ENTRY_WORD7,
+ splt->contents + h->plt.offset + 28);
+ /* Fixup the relative address to the GOT entry */
+ bfd_put_32 (output_bfd,
+ (sgot->output_section->vma + sgot->output_offset + got_offset
+ - (splt->output_section->vma + h->plt.offset))/2,
+ splt->contents + h->plt.offset + 2);
+ /* Fixup the relative branch to PLT 0 */
+ bfd_put_32 (output_bfd, - (PLT_FIRST_ENTRY_SIZE +
+ (PLT_ENTRY_SIZE * plt_index) + 22)/2,
+ splt->contents + h->plt.offset + 24);
+ /* Fixup offset into symbol table */
+ bfd_put_32 (output_bfd, plt_index * sizeof (Elf64_External_Rela),
+ splt->contents + h->plt.offset + 28);
+
+ /* Fill in the entry in the .rela.plt section. */
+ rela.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + got_offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_390_JMP_SLOT);
+ rela.r_addend = 0;
+ bfd_elf64_swap_reloca_out (output_bfd, &rela,
+ ((Elf64_External_Rela *) srela->contents
+ + plt_index ));
+
+ /* Fill in the entry in the global offset table.
+ Points to instruction after GOT offset. */
+ bfd_put_64 (output_bfd,
+ (splt->output_section->vma
+ + splt->output_offset
+ + h->plt.offset
+ + 14),
+ sgot->contents + got_offset);
+
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ /* Mark the symbol as undefined, rather than as defined in
+ the .plt section. Leave the value alone. */
+ sym->st_shndx = SHN_UNDEF;
+ }
+ }
+
+ if (h->got.offset != (bfd_vma) -1)
+ {
+ asection *sgot;
+ asection *srela;
+ Elf_Internal_Rela rela;
+
+ /* This symbol has an entry in the global offset table. Set it
+ up. */
+
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ srela = bfd_get_section_by_name (dynobj, ".rela.got");
+ BFD_ASSERT (sgot != NULL && srela != NULL);
+
+ rela.r_offset = (sgot->output_section->vma
+ + sgot->output_offset
+ + (h->got.offset &~ 1));
+
+ /* If this is a 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 (! elf_hash_table (info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->dynindx == -1)
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ {
+ rela.r_info = ELF64_R_INFO (0, R_390_RELATIVE);
+ rela.r_addend = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+ else
+ {
+ BFD_ASSERT((h->got.offset & 1) == 0);
+ bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_390_GLOB_DAT);
+ rela.r_addend = 0;
+ }
+
+ bfd_elf64_swap_reloca_out (output_bfd, &rela,
+ ((Elf64_External_Rela *) srela->contents
+ + srela->reloc_count));
+ ++srela->reloc_count;
+ }
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ {
+ asection *s;
+ Elf_Internal_Rela rela;
+
+ /* This symbols needs a copy reloc. Set it up. */
+
+ BFD_ASSERT (h->dynindx != -1
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak));
+
+
+ s = bfd_get_section_by_name (h->root.u.def.section->owner,
+ ".rela.bss");
+ BFD_ASSERT (s != NULL);
+
+ rela.r_offset = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_390_COPY);
+ rela.r_addend = 0;
+ bfd_elf64_swap_reloca_out (output_bfd, &rela,
+ ((Elf64_External_Rela *) s->contents
+ + s->reloc_count));
+ ++s->reloc_count;
+ }
+
+ /* Mark some specially defined symbols as absolute. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0
+ || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
+ || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
+ sym->st_shndx = SHN_ABS;
+
+ return true;
+}
+
+/* Finish up the dynamic sections. */
+
+static boolean
+elf_s390_finish_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ bfd *dynobj;
+ asection *sdyn;
+ asection *sgot;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ sgot = bfd_get_section_by_name (dynobj, ".got.plt");
+ BFD_ASSERT (sgot != NULL);
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ asection *splt;
+ Elf64_External_Dyn *dyncon, *dynconend;
+
+ BFD_ASSERT (sdyn != NULL);
+
+ dyncon = (Elf64_External_Dyn *) sdyn->contents;
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+ const char *name;
+ asection *s;
+
+ bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ default:
+ break;
+
+ case DT_PLTGOT:
+ name = ".got";
+ goto get_vma;
+ case DT_JMPREL:
+ name = ".rela.plt";
+ get_vma:
+ s = bfd_get_section_by_name(output_bfd, name);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->vma;
+ bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_PLTRELSZ:
+ s = bfd_get_section_by_name (output_bfd, ".rela.plt");
+ BFD_ASSERT (s != NULL);
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val = s->_cooked_size;
+ else
+ dyn.d_un.d_val = s->_raw_size;
+ bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+
+ case DT_RELASZ:
+ /* The procedure linkage table relocs (DT_JMPREL) should
+ not be included in the overall relocs (DT_RELA).
+ Therefore, we override the DT_RELASZ entry here to
+ make it not include the JMPREL relocs. Since the
+ linker script arranges for .rela.plt to follow all
+ other relocation sections, we don't have to worry
+ about changing the DT_RELA entry. */
+ s = bfd_get_section_by_name (output_bfd, ".rela.plt");
+ if (s != NULL)
+ {
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val -= s->_cooked_size;
+ else
+ dyn.d_un.d_val -= s->_raw_size;
+ }
+ bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
+ break;
+ }
+ }
+
+ /* Fill in the special first entry in the procedure linkage table. */
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ if (splt && splt->_raw_size > 0)
+ {
+ /* fill in blueprint for plt 0 entry */
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD0,
+ splt->contents );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD1,
+ splt->contents +4 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD3,
+ splt->contents +12 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD4,
+ splt->contents +16 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD5,
+ splt->contents +20 );
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD6,
+ splt->contents + 24);
+ bfd_put_32 (output_bfd, PLT_FIRST_ENTRY_WORD7,
+ splt->contents + 28 );
+ /* Fixup relative address to start of GOT */
+ bfd_put_32 (output_bfd,
+ (sgot->output_section->vma + sgot->output_offset
+ - splt->output_section->vma - 6)/2,
+ splt->contents + 8);
+ }
+
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize =
+ PLT_ENTRY_SIZE;
+ }
+
+ /* Set the first entry in the global offset table to the address of
+ the dynamic section. */
+ if (sgot->_raw_size > 0)
+ {
+ if (sdyn == NULL)
+ bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents);
+ else
+ bfd_put_64 (output_bfd,
+ sdyn->output_section->vma + sdyn->output_offset,
+ sgot->contents);
+
+ /* One entry for shared object struct ptr. */
+ bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + 8);
+ /* One entry for _dl_runtime_resolve. */
+ bfd_put_64 (output_bfd, (bfd_vma) 0, sgot->contents + 12);
+ }
+
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 8;
+
+ return true;
+}
+
+static boolean
+elf_s390_object_p (abfd)
+ bfd *abfd;
+{
+ return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_esame);
+}
+
+/*
+ * Why was the hash table entry size definition changed from
+ * ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and
+ * this is the only reason for the s390_elf64_size_info structure.
+ */
+
+const struct elf_size_info s390_elf64_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, /* hash-table entry size */
+ 1, /* internal relocations per external relocations */
+ 64, /* arch_size */
+ 8, /* file_align */
+ 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_BIG_SYM bfd_elf64_s390_vec
+#define TARGET_BIG_NAME "elf64-s390"
+#define ELF_ARCH bfd_arch_s390
+#define ELF_MACHINE_CODE EM_S390
+#define ELF_MACHINE_ALT1 EM_S390_OLD
+#define ELF_MAXPAGESIZE 0x1000
+
+#define elf_backend_size_info s390_elf64_size_info
+
+#define elf_backend_can_gc_sections 1
+#define elf_backend_want_got_plt 1
+#define elf_backend_plt_readonly 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_got_header_size 24
+#define elf_backend_plt_header_size PLT_ENTRY_SIZE
+
+#define elf_info_to_howto elf_s390_info_to_howto
+
+#define bfd_elf64_bfd_final_link _bfd_elf64_gc_common_final_link
+#define bfd_elf64_bfd_is_local_label_name elf_s390_is_local_label_name
+#define bfd_elf64_bfd_link_hash_table_create elf_s390_link_hash_table_create
+#define bfd_elf64_bfd_reloc_type_lookup elf_s390_reloc_type_lookup
+
+#define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol
+#define elf_backend_check_relocs elf_s390_check_relocs
+#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections
+#define elf_backend_finish_dynamic_sections elf_s390_finish_dynamic_sections
+#define elf_backend_finish_dynamic_symbol elf_s390_finish_dynamic_symbol
+#define elf_backend_gc_mark_hook elf_s390_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf_s390_gc_sweep_hook
+#define elf_backend_relocate_section elf_s390_relocate_section
+#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
+
+#define elf_backend_object_p elf_s390_object_p
+
+#include "elf64-target.h"
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 68f9316..7fee079 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -910,6 +910,23 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_HI8_LDI_PM_NEG",
"BFD_RELOC_AVR_HH8_LDI_PM_NEG",
"BFD_RELOC_AVR_CALL",
+ "BFD_RELOC_390_12",
+ "BFD_RELOC_390_GOT12",
+ "BFD_RELOC_390_PLT32",
+ "BFD_RELOC_390_COPY",
+ "BFD_RELOC_390_GLOB_DAT",
+ "BFD_RELOC_390_JMP_SLOT",
+ "BFD_RELOC_390_RELATIVE",
+ "BFD_RELOC_390_GOTPC",
+ "BFD_RELOC_390_GOT16",
+ "BFD_RELOC_390_PC16DBL",
+ "BFD_RELOC_390_PLT16DBL",
+ "BFD_RELOC_390_PC32DBL",
+ "BFD_RELOC_390_PLT32DBL",
+ "BFD_RELOC_390_GOTPCDBL",
+ "BFD_RELOC_390_GOT64",
+ "BFD_RELOC_390_PLT64",
+ "BFD_RELOC_390_GOTENT",
"BFD_RELOC_VTABLE_INHERIT",
"BFD_RELOC_VTABLE_ENTRY",
"BFD_RELOC_IA64_IMM14",
diff --git a/bfd/po/POTFILES.in b/bfd/po/POTFILES.in
index f75b4ca..1ac5d8e 100644
--- a/bfd/po/POTFILES.in
+++ b/bfd/po/POTFILES.in
@@ -85,6 +85,7 @@ cpu-ns32k.c
cpu-pj.c
cpu-powerpc.c
cpu-rs6000.c
+cpu-s390.c
cpu-sh.c
cpu-sparc.c
cpu-tic30.c
@@ -127,6 +128,7 @@ elf32-mcore.c
elf32-mips.c
elf32-pj.c
elf32-ppc.c
+elf32-s390.c
elf32-sh.c
elf32-sh-lin.c
elf32-sparc.c
@@ -137,6 +139,7 @@ elf64-gen.c
elf64-hppa.c
elf64-hppa.h
elf64-mips.c
+elf64-s390.c
elf64-sparc.c
elf64-x86-64.c
elfarm-nabi.c
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 40cba07..38af0b5 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-02-07 15:02-0800\n"
+"POT-Creation-Date: 2001-02-09 16:27-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -191,7 +191,7 @@ msgstr ""
msgid "GP relative relocation used when GP not defined"
msgstr ""
-#: coff-alpha.c:1486 elf64-alpha.c:4037
+#: coff-alpha.c:1486 elf64-alpha.c:4044
msgid "using multiple gp values"
msgstr ""
@@ -375,7 +375,7 @@ msgstr ""
msgid "uncertain calling convention for non-COFF symbol"
msgstr ""
-#: cofflink.c:526 elflink.h:1647
+#: cofflink.c:526 elflink.h:1651
#, c-format
msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr ""
@@ -549,8 +549,9 @@ msgstr ""
msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
msgstr ""
-#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1853 elf32-i386.c:1439
-#: elf32-ppc.c:3092 elf32-sh.c:2996 elf64-x86-64.c:1182
+#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1853 elf32-i386.c:1442
+#: elf32-ppc.c:3092 elf32-s390.c:1442 elf32-sh.c:2996 elf64-s390.c:1431
+#: elf64-x86-64.c:1182
#, c-format
msgid ""
"%s: warning: unresolvable relocation against symbol `%s' from %s section"
@@ -799,12 +800,12 @@ msgstr ""
msgid "%s: invalid relocation type %d"
msgstr ""
-#: elf32-i386.c:678 elf32-i386.c:1646
+#: elf32-i386.c:681 elf32-i386.c:1649
#, c-format
msgid "%s(%s): bad relocation section name `%s'"
msgstr ""
-#: elf32-i386.c:683 elf32-i386.c:1651
+#: elf32-i386.c:686 elf32-i386.c:1654
#, c-format
msgid "%s: bad relocation section name `%s'"
msgstr ""
@@ -889,7 +890,7 @@ msgstr ""
msgid "%s: ABI mismatch: linking %s module with previous %s modules"
msgstr ""
-#: elf32-mips.c:2667 elf32-ppc.c:1477 elf64-sparc.c:2969
+#: elf32-mips.c:2667 elf32-ppc.c:1477 elf64-sparc.c:2991
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
@@ -970,7 +971,7 @@ msgstr ""
msgid "static procedure (no name)"
msgstr ""
-#: elf32-mips.c:5005 elf64-alpha.c:4410
+#: elf32-mips.c:5005 elf64-alpha.c:4417
#, c-format
msgid "%s: illegal section name `%s'"
msgstr ""
@@ -1072,7 +1073,7 @@ msgstr ""
msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
msgstr ""
-#: elf32-sparc.c:1512 elf64-sparc.c:2260
+#: elf32-sparc.c:1512 elf64-sparc.c:2264
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr ""
@@ -1154,11 +1155,11 @@ msgstr ""
msgid "v850ea architecture"
msgstr ""
-#: elf64-alpha.c:978
+#: elf64-alpha.c:985
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr ""
-#: elf64-alpha.c:3047
+#: elf64-alpha.c:3054
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr ""
@@ -1168,32 +1169,32 @@ msgstr ""
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr ""
-#: elf64-sparc.c:1246
+#: elf64-sparc.c:1249
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"
msgstr ""
-#: elf64-sparc.c:1283
+#: elf64-sparc.c:1286
msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr ""
-#: elf64-sparc.c:1303
+#: elf64-sparc.c:1306
msgid ""
"Register %%g%d used incompatibly: previously declared in %s to %s, in %s "
"redefined to %s"
msgstr ""
-#: elf64-sparc.c:1326
+#: elf64-sparc.c:1329
#, c-format
msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s"
msgstr ""
-#: elf64-sparc.c:1372
+#: elf64-sparc.c:1375
#, c-format
msgid "Symbol `%s' has differing types: REGISTER in %s, %s in %s"
msgstr ""
-#: elf64-sparc.c:2950
+#: elf64-sparc.c:2972
#, c-format
msgid "%s: linking UltraSPARC specific with HAL specific code"
msgstr ""
@@ -1269,24 +1270,24 @@ msgstr ""
msgid "%s: warning: allocated section `%s' not in segment"
msgstr ""
-#: elf.c:3616
+#: elf.c:3619
#, c-format
msgid "%s: symbol `%s' required but not present"
msgstr ""
-#: elf.c:3625
+#: elf.c:3628
#, c-format
msgid ""
"elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = "
"0x%.8lx%s\n"
msgstr ""
-#: elf.c:3866
+#: elf.c:3869
#, c-format
msgid "%s: warning: Empty loadable segment detected\n"
msgstr ""
-#: elf.c:5213
+#: elf.c:5216
#, c-format
msgid "%s: unsupported relocation type %s"
msgstr ""
@@ -1301,37 +1302,37 @@ msgstr ""
msgid "%s: Section %s is already to large to put hole of %ld bytes in"
msgstr ""
-#: elflink.h:1464
+#: elflink.h:1468
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr ""
-#: elflink.h:1505
+#: elflink.h:1509
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr ""
-#: elflink.h:1625
+#: elflink.h:1629
#, c-format
msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
msgstr ""
-#: elflink.h:1871
+#: elflink.h:1875
#, c-format
msgid "%s: warning: unexpected redefinition of `%s'"
msgstr ""
-#: elflink.h:3656
+#: elflink.h:3660
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
-#: elflink.h:3928
+#: elflink.h:3932
#, c-format
msgid "%s: undefined versioned symbol name %s"
msgstr ""
-#: elflink.h:5177
+#: elflink.h:5181
#, c-format
msgid "%s: could not find output section %s for input section %s"
msgstr ""
diff --git a/bfd/reloc.c b/bfd/reloc.c
index f37a6a9..9d45163 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2736,6 +2736,75 @@ ENUMDOC
into 22 bits.
ENUM
+ BFD_RELOC_390_12
+ENUMDOC
+ Direct 12 bit.
+ENUM
+ BFD_RELOC_390_GOT12
+ENUMDOC
+ 12 bit GOT offset.
+ENUM
+ BFD_RELOC_390_PLT32
+ENUMDOC
+ 32 bit PC relative PLT address.
+ENUM
+ BFD_RELOC_390_COPY
+ENUMDOC
+ Copy symbol at runtime.
+ENUM
+ BFD_RELOC_390_GLOB_DAT
+ENUMDOC
+ Create GOT entry.
+ENUM
+ BFD_RELOC_390_JMP_SLOT
+ENUMDOC
+ Create PLT entry.
+ENUM
+ BFD_RELOC_390_RELATIVE
+ENUMDOC
+ Adjust by program base.
+ENUM
+ BFD_RELOC_390_GOTPC
+ENUMDOC
+ 32 bit PC relative offset to GOT.
+ENUM
+ BFD_RELOC_390_GOT16
+ENUMDOC
+ 16 bit GOT offset.
+ENUM
+ BFD_RELOC_390_PC16DBL
+ENUMDOC
+ PC relative 16 bit shifted by 1.
+ENUM
+ BFD_RELOC_390_PLT16DBL
+ENUMDOC
+ 16 bit PC rel. PLT shifted by 1.
+ENUM
+ BFD_RELOC_390_PC32DBL
+ENUMDOC
+ PC relative 32 bit shifted by 1.
+ENUM
+ BFD_RELOC_390_PLT32DBL
+ENUMDOC
+ 32 bit PC rel. PLT shifted by 1.
+ENUM
+ BFD_RELOC_390_GOTPCDBL
+ENUMDOC
+ 32 bit PC rel. GOT shifted by 1.
+ENUM
+ BFD_RELOC_390_GOT64
+ENUMDOC
+ 64 bit GOT offset.
+ENUM
+ BFD_RELOC_390_PLT64
+ENUMDOC
+ 64 bit PC relative PLT address.
+ENUM
+ BFD_RELOC_390_GOTENT
+ENUMDOC
+ 32 bit rel. offset to GOT entry.
+
+ENUM
BFD_RELOC_VTABLE_INHERIT
ENUMX
BFD_RELOC_VTABLE_ENTRY
diff --git a/bfd/targets.c b/bfd/targets.c
index 0211ec8..70b262d 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -542,6 +542,7 @@ extern const bfd_target bfd_elf32_pj_vec;
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
+extern const bfd_target bfd_elf32_s390_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
@@ -560,6 +561,7 @@ 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_s390_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;
@@ -925,7 +927,10 @@ static const bfd_target * const _bfd_target_vector[] = {
&vms_vax_vec,
&we32kcoff_vec,
&z8kcoff_vec,
-
+ &bfd_elf32_s390_vec,
+#ifdef BFD64
+ &bfd_elf64_s390_vec,
+#endif
#endif /* not SELECT_VECS */
/* Always support S-records, for convenience. */
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b7b671f..10e0742 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * readelf.c: Add linux target for S/390.
+
2001-02-10 Alan Modra <alan@linuxcare.com.au>
* nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
diff --git a/binutils/po/binutils.pot b/binutils/po/binutils.pot
index 4533b9d..7508823 100644
--- a/binutils/po/binutils.pot
+++ b/binutils/po/binutils.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-02-07 15:09-0800\n"
+"POT-Creation-Date: 2001-02-09 16:01-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -23,7 +23,7 @@ msgid ""
msgstr ""
#: addr2line.c:83 ar.c:288 nlmconv.c:1119 objcopy.c:373 objcopy.c:405
-#: readelf.c:1966 size.c:91 strings.c:530 windres.c:737
+#: readelf.c:1973 size.c:91 strings.c:530 windres.c:737
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
@@ -1482,7 +1482,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1552
+#: nm.c:1550
msgid ""
"\n"
"Archive index:\n"
@@ -2000,1010 +2000,1010 @@ msgstr ""
msgid "Last stabs entries before error:\n"
msgstr ""
-#: readelf.c:270
+#: readelf.c:271
#, c-format
msgid "Unable to seek to start of %s at %x\n"
msgstr ""
-#: readelf.c:278
+#: readelf.c:279
#, c-format
msgid "Out of memory allocating %d bytes for %s\n"
msgstr ""
-#: readelf.c:284
+#: readelf.c:285
#, c-format
msgid "Unable to read in %d bytes of %s\n"
msgstr ""
-#: readelf.c:294
+#: readelf.c:295
#, c-format
msgid "Unable to seek to %x for %s\n"
msgstr ""
-#: readelf.c:299
+#: readelf.c:300
#, c-format
msgid "Unable to read data at %x for %s\n"
msgstr ""
-#: readelf.c:314 readelf.c:340
+#: readelf.c:315 readelf.c:341
#, c-format
msgid "%s: Error: "
msgstr ""
-#: readelf.c:326 readelf.c:355
+#: readelf.c:327 readelf.c:356
#, c-format
msgid "%s: Warning: "
msgstr ""
-#: readelf.c:405 readelf.c:543
+#: readelf.c:406 readelf.c:544
#, c-format
msgid "Unhandled data length: %d\n"
msgstr ""
-#: readelf.c:607
+#: readelf.c:609
msgid "Don't know about relocations on this machine architecture\n"
msgstr ""
-#: readelf.c:638 readelf.c:665 readelf.c:708 readelf.c:733
+#: readelf.c:640 readelf.c:667 readelf.c:710 readelf.c:735
msgid "out of memory parsing relocs"
msgstr ""
-#: readelf.c:782
+#: readelf.c:784
msgid ""
" Offset Info Type Symbol's Value Symbol's Name "
"Addend\n"
msgstr ""
-#: readelf.c:785
+#: readelf.c:787
msgid " Offset Info Type Symbol's Value Symbol's Name\n"
msgstr ""
-#: readelf.c:945 readelf.c:947
+#: readelf.c:951 readelf.c:953
#, c-format
msgid "unrecognised: %-7lx"
msgstr ""
-#: readelf.c:972
+#: readelf.c:978
#, c-format
msgid "<string table index %3ld>"
msgstr ""
-#: readelf.c:1185
+#: readelf.c:1191
#, c-format
msgid "Processor Specific: %lx"
msgstr ""
-#: readelf.c:1204
+#: readelf.c:1210
#, c-format
msgid "Operating System specific: %lx"
msgstr ""
-#: readelf.c:1207 readelf.c:1748
+#: readelf.c:1213 readelf.c:1755
#, c-format
msgid "<unknown>: %lx"
msgstr ""
-#: readelf.c:1221
+#: readelf.c:1227
msgid "NONE (None)"
msgstr ""
-#: readelf.c:1222
+#: readelf.c:1228
msgid "REL (Relocatable file)"
msgstr ""
-#: readelf.c:1223
+#: readelf.c:1229
msgid "EXEC (Executable file)"
msgstr ""
-#: readelf.c:1224
+#: readelf.c:1230
msgid "DYN (Shared object file)"
msgstr ""
-#: readelf.c:1225
+#: readelf.c:1231
msgid "CORE (Core file)"
msgstr ""
-#: readelf.c:1229
+#: readelf.c:1235
#, c-format
msgid "Processor Specific: (%x)"
msgstr ""
-#: readelf.c:1231
+#: readelf.c:1237
#, c-format
msgid "OS Specific: (%x)"
msgstr ""
-#: readelf.c:1233 readelf.c:1319 readelf.c:1899
+#: readelf.c:1239 readelf.c:1326 readelf.c:1906
#, c-format
msgid "<unknown>: %x"
msgstr ""
-#: readelf.c:1246
+#: readelf.c:1252
msgid "None"
msgstr ""
-#: readelf.c:1938
+#: readelf.c:1945
msgid "Usage: readelf {options} elf-file(s)\n"
msgstr ""
-#: readelf.c:1939
+#: readelf.c:1946
msgid " Options are:\n"
msgstr ""
-#: readelf.c:1940
+#: readelf.c:1947
msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"
msgstr ""
-#: readelf.c:1941
+#: readelf.c:1948
msgid " -h or --file-header Display the ELF file header\n"
msgstr ""
-#: readelf.c:1942
+#: readelf.c:1949
msgid " -l or --program-headers or --segments\n"
msgstr ""
-#: readelf.c:1943
+#: readelf.c:1950
msgid " Display the program headers\n"
msgstr ""
-#: readelf.c:1944
+#: readelf.c:1951
msgid " -S or --section-headers or --sections\n"
msgstr ""
-#: readelf.c:1945
+#: readelf.c:1952
msgid " Display the sections' header\n"
msgstr ""
-#: readelf.c:1946
+#: readelf.c:1953
msgid " -e or --headers Equivalent to: -h -l -S\n"
msgstr ""
-#: readelf.c:1947
+#: readelf.c:1954
msgid " -s or --syms or --symbols Display the symbol table\n"
msgstr ""
-#: readelf.c:1948
+#: readelf.c:1955
msgid " -n or --notes Display the core notes (if present)\n"
msgstr ""
-#: readelf.c:1949
+#: readelf.c:1956
msgid " -r or --relocs Display the relocations (if present)\n"
msgstr ""
-#: readelf.c:1950
+#: readelf.c:1957
msgid " -u or --unwind Display the unwind info (if present)\n"
msgstr ""
-#: readelf.c:1951
+#: readelf.c:1958
msgid " -d or --dynamic Display the dynamic segment (if present)\n"
msgstr ""
-#: readelf.c:1952
+#: readelf.c:1959
msgid " -V or --version-info Display the version sections (if present)\n"
msgstr ""
-#: readelf.c:1953
+#: readelf.c:1960
msgid ""
" -A or --arch-specific Display architecture specific information (if "
"any).\n"
msgstr ""
-#: readelf.c:1954
+#: readelf.c:1961
msgid ""
" -D or --use-dynamic Use the dynamic section info when displaying "
"symbols\n"
msgstr ""
-#: readelf.c:1955
+#: readelf.c:1962
msgid " -x <number> or --hex-dump=<number>\n"
msgstr ""
-#: readelf.c:1956
+#: readelf.c:1963
msgid " Dump the contents of section <number>\n"
msgstr ""
-#: readelf.c:1957
+#: readelf.c:1964
msgid ""
" -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n"
msgstr ""
-#: readelf.c:1958
+#: readelf.c:1965
msgid ""
" Display the contents of DWARF2 debug sections\n"
msgstr ""
-#: readelf.c:1960
+#: readelf.c:1967
msgid " -i <number> or --instruction-dump=<number>\n"
msgstr ""
-#: readelf.c:1961
+#: readelf.c:1968
msgid ""
" Disassemble the contents of section <number>\n"
msgstr ""
-#: readelf.c:1963
+#: readelf.c:1970
msgid " -I or --histogram Display histogram of bucket list lengths\n"
msgstr ""
-#: readelf.c:1964
+#: readelf.c:1971
msgid " -v or --version Display the version number of readelf\n"
msgstr ""
-#: readelf.c:1965
+#: readelf.c:1972
msgid " -H or --help Display this information\n"
msgstr ""
-#: readelf.c:1983
+#: readelf.c:1990
msgid "Out of memory allocating dump request table."
msgstr ""
-#: readelf.c:2127
+#: readelf.c:2134
#, c-format
msgid "Unrecognised debug option '%s'\n"
msgstr ""
-#: readelf.c:2152
+#: readelf.c:2159
#, c-format
msgid "Invalid option '-%c'\n"
msgstr ""
-#: readelf.c:2165
+#: readelf.c:2172
msgid "Nothing to do.\n"
msgstr ""
-#: readelf.c:2178 readelf.c:2195 readelf.c:4192
+#: readelf.c:2185 readelf.c:2202 readelf.c:4199
msgid "none"
msgstr ""
-#: readelf.c:2179
+#: readelf.c:2186
msgid "ELF32"
msgstr ""
-#: readelf.c:2180
+#: readelf.c:2187
msgid "ELF64"
msgstr ""
-#: readelf.c:2182 readelf.c:2199 readelf.c:2227
+#: readelf.c:2189 readelf.c:2206 readelf.c:2234
#, c-format
msgid "<unknown: %x>"
msgstr ""
-#: readelf.c:2196
+#: readelf.c:2203
msgid "2's complement, little endian"
msgstr ""
-#: readelf.c:2197
+#: readelf.c:2204
msgid "2's complement, big endian"
msgstr ""
-#: readelf.c:2212
+#: readelf.c:2219
msgid "UNIX - System V"
msgstr ""
-#: readelf.c:2213
+#: readelf.c:2220
msgid "UNIX - HP-UX"
msgstr ""
-#: readelf.c:2214
+#: readelf.c:2221
msgid "UNIX - NetBSD"
msgstr ""
-#: readelf.c:2215
+#: readelf.c:2222
msgid "UNIX - Linux"
msgstr ""
-#: readelf.c:2216
+#: readelf.c:2223
msgid "GNU/Hurd"
msgstr ""
-#: readelf.c:2217
+#: readelf.c:2224
msgid "UNIX - Solaris"
msgstr ""
-#: readelf.c:2218
+#: readelf.c:2225
msgid "UNIX - AIX"
msgstr ""
-#: readelf.c:2219
+#: readelf.c:2226
msgid "UNIX - IRIX"
msgstr ""
-#: readelf.c:2220
+#: readelf.c:2227
msgid "UNIX - FreeBSD"
msgstr ""
-#: readelf.c:2221
+#: readelf.c:2228
msgid "UNIX - TRU64"
msgstr ""
-#: readelf.c:2222
+#: readelf.c:2229
msgid "Novell - Modesto"
msgstr ""
-#: readelf.c:2223
+#: readelf.c:2230
msgid "UNIX - OpenBSD"
msgstr ""
-#: readelf.c:2224
+#: readelf.c:2231
msgid "Standalone App"
msgstr ""
-#: readelf.c:2225
+#: readelf.c:2232
msgid "ARM"
msgstr ""
-#: readelf.c:2242
+#: readelf.c:2249
msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
msgstr ""
-#: readelf.c:2250
+#: readelf.c:2257
msgid "ELF Header:\n"
msgstr ""
-#: readelf.c:2251
+#: readelf.c:2258
msgid " Magic: "
msgstr ""
-#: readelf.c:2255
+#: readelf.c:2262
#, c-format
msgid " Class: %s\n"
msgstr ""
-#: readelf.c:2257
+#: readelf.c:2264
#, c-format
msgid " Data: %s\n"
msgstr ""
-#: readelf.c:2259
+#: readelf.c:2266
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: readelf.c:2266
+#: readelf.c:2273
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: readelf.c:2268
+#: readelf.c:2275
#, c-format
msgid " ABI Version: %d\n"
msgstr ""
-#: readelf.c:2270
+#: readelf.c:2277
#, c-format
msgid " Type: %s\n"
msgstr ""
-#: readelf.c:2272
+#: readelf.c:2279
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: readelf.c:2274
+#: readelf.c:2281
#, c-format
msgid " Version: 0x%lx\n"
msgstr ""
-#: readelf.c:2277
+#: readelf.c:2284
msgid " Entry point address: "
msgstr ""
-#: readelf.c:2279
+#: readelf.c:2286
msgid ""
"\n"
" Start of program headers: "
msgstr ""
-#: readelf.c:2281
+#: readelf.c:2288
msgid ""
" (bytes into file)\n"
" Start of section headers: "
msgstr ""
-#: readelf.c:2283
+#: readelf.c:2290
msgid " (bytes into file)\n"
msgstr ""
-#: readelf.c:2285
+#: readelf.c:2292
#, c-format
msgid " Flags: 0x%lx%s\n"
msgstr ""
-#: readelf.c:2288
+#: readelf.c:2295
#, c-format
msgid " Size of this header: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2290
+#: readelf.c:2297
#, c-format
msgid " Size of program headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2292
+#: readelf.c:2299
#, c-format
msgid " Number of program headers: %ld\n"
msgstr ""
-#: readelf.c:2294
+#: readelf.c:2301
#, c-format
msgid " Size of section headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2296
+#: readelf.c:2303
#, c-format
msgid " Number of section headers: %ld\n"
msgstr ""
-#: readelf.c:2298
+#: readelf.c:2305
#, c-format
msgid " Section header string table index: %ld\n"
msgstr ""
-#: readelf.c:2383
+#: readelf.c:2390
msgid ""
"\n"
"There are no program headers in this file.\n"
msgstr ""
-#: readelf.c:2389
+#: readelf.c:2396
#, c-format
msgid ""
"\n"
"Elf file type is %s\n"
msgstr ""
-#: readelf.c:2390
+#: readelf.c:2397
msgid "Entry point "
msgstr ""
-#: readelf.c:2392
+#: readelf.c:2399
#, c-format
msgid ""
"\n"
"There are %d program headers, starting at offset "
msgstr ""
-#: readelf.c:2403 readelf.c:2579 readelf.c:2621 readelf.c:2664 readelf.c:2705
-#: readelf.c:3585 readelf.c:3626 readelf.c:3802 readelf.c:4723 readelf.c:4737
-#: readelf.c:8108 readelf.c:8148
+#: readelf.c:2410 readelf.c:2586 readelf.c:2628 readelf.c:2671 readelf.c:2712
+#: readelf.c:3592 readelf.c:3633 readelf.c:3809 readelf.c:4730 readelf.c:4744
+#: readelf.c:8115 readelf.c:8155
msgid "Out of memory\n"
msgstr ""
-#: readelf.c:2421
+#: readelf.c:2428
#, c-format
msgid ""
"\n"
"Program Header%s:\n"
msgstr ""
-#: readelf.c:2425
+#: readelf.c:2432
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:2429
+#: readelf.c:2436
msgid " Type Offset VirtAddr PhysAddr\n"
msgstr ""
-#: readelf.c:2431
+#: readelf.c:2438
msgid " FileSiz MemSiz Flags Align\n"
msgstr ""
-#: readelf.c:2489
+#: readelf.c:2496
msgid "more than one dynamic segment\n"
msgstr ""
-#: readelf.c:2497
+#: readelf.c:2504
msgid "Unable to find program interpreter name\n"
msgstr ""
-#: readelf.c:2504
+#: readelf.c:2511
#, c-format
msgid ""
"\n"
" [Requesting program interpreter: %s]"
msgstr ""
-#: readelf.c:2522
+#: readelf.c:2529
msgid ""
"\n"
" Section to Segment mapping:\n"
msgstr ""
-#: readelf.c:2523
+#: readelf.c:2530
msgid " Segment Sections...\n"
msgstr ""
-#: readelf.c:2787
+#: readelf.c:2794
msgid ""
"\n"
"There are no sections in this file.\n"
msgstr ""
-#: readelf.c:2793
+#: readelf.c:2800
#, c-format
msgid "There are %d section headers, starting at offset 0x%lx:\n"
msgstr ""
-#: readelf.c:2831
+#: readelf.c:2838
msgid "File contains multiple dynamic symbol tables\n"
msgstr ""
-#: readelf.c:2844
+#: readelf.c:2851
msgid "File contains multiple dynamic string tables\n"
msgstr ""
-#: readelf.c:2878
+#: readelf.c:2885
#, c-format
msgid ""
"\n"
"Section Header%s:\n"
msgstr ""
-#: readelf.c:2882
+#: readelf.c:2889
msgid ""
" [Nr] Name Type Addr Off Size ES Flg Lk "
"Inf Al\n"
msgstr ""
-#: readelf.c:2885
+#: readelf.c:2892
msgid " [Nr] Name Type Address Offset\n"
msgstr ""
-#: readelf.c:2886
+#: readelf.c:2893
msgid " Size EntSize Flags Link Info Align\n"
msgstr ""
-#: readelf.c:2933
+#: readelf.c:2940
msgid "Key to Flags:\n"
msgstr ""
-#: readelf.c:2934
+#: readelf.c:2941
msgid " W (write), A (alloc), X (execute), M (merge), S (strings)\n"
msgstr ""
-#: readelf.c:2935
+#: readelf.c:2942
msgid " I (info), L (link order), G (group), x (unknown)\n"
msgstr ""
-#: readelf.c:2936
+#: readelf.c:2943
msgid ""
" O (extra OS processing required) o (OS specific), p (processor specific)\n"
msgstr ""
-#: readelf.c:2994
+#: readelf.c:3001
#, c-format
msgid ""
"\n"
"Relocation section at offset 0x%lx contains %ld bytes:\n"
msgstr ""
-#: readelf.c:3001
+#: readelf.c:3008
msgid ""
"\n"
"There are no dynamic relocations in this file.\n"
msgstr ""
-#: readelf.c:3029
+#: readelf.c:3036
msgid ""
"\n"
"Relocation section "
msgstr ""
-#: readelf.c:3036 readelf.c:3407
+#: readelf.c:3043 readelf.c:3414
#, c-format
msgid " at offset 0x%lx contains %lu entries:\n"
msgstr ""
-#: readelf.c:3064
+#: readelf.c:3071
msgid ""
"\n"
"There are no relocations in this file.\n"
msgstr ""
-#: readelf.c:3308 readelf.c:3320
+#: readelf.c:3315 readelf.c:3327
#, c-format
msgid "Skipping unexpected symbol type %u"
msgstr ""
-#: readelf.c:3328
+#: readelf.c:3335
#, c-format
msgid "Skipping unexpected relocation type %s"
msgstr ""
-#: readelf.c:3400
+#: readelf.c:3407
msgid ""
"\n"
"Unwind section "
msgstr ""
-#: readelf.c:3416
+#: readelf.c:3423
msgid ""
"\n"
"There are no unwind sections in this file.\n"
msgstr ""
-#: readelf.c:3679
+#: readelf.c:3686
msgid ""
"\n"
"There is no dynamic segment in this file.\n"
msgstr ""
-#: readelf.c:3713
+#: readelf.c:3720
msgid "Unable to seek to end of file!"
msgstr ""
-#: readelf.c:3722
+#: readelf.c:3729
msgid "Unable to determine the number of symbols to load\n"
msgstr ""
-#: readelf.c:3752
+#: readelf.c:3759
msgid "Unable to seek to end of file\n"
msgstr ""
-#: readelf.c:3758
+#: readelf.c:3765
msgid "Unable to determine the length of the dynamic string table\n"
msgstr ""
-#: readelf.c:3819
+#: readelf.c:3826
#, c-format
msgid ""
"\n"
"Dynamic segment at offset 0x%x contains %ld entries:\n"
msgstr ""
-#: readelf.c:3822
+#: readelf.c:3829
msgid " Tag Type Name/Value\n"
msgstr ""
-#: readelf.c:3858
+#: readelf.c:3865
msgid "Auxiliary library"
msgstr ""
-#: readelf.c:3862
+#: readelf.c:3869
msgid "Filter library"
msgstr ""
-#: readelf.c:3866
+#: readelf.c:3873
msgid "Configuration file"
msgstr ""
-#: readelf.c:3870
+#: readelf.c:3877
msgid "Dependency audit library"
msgstr ""
-#: readelf.c:3874
+#: readelf.c:3881
msgid "Audit library"
msgstr ""
-#: readelf.c:3892 readelf.c:3918 readelf.c:3944
+#: readelf.c:3899 readelf.c:3925 readelf.c:3951
msgid "Flags:"
msgstr ""
-#: readelf.c:3894 readelf.c:3920 readelf.c:3946
+#: readelf.c:3901 readelf.c:3927 readelf.c:3953
msgid " None\n"
msgstr ""
-#: readelf.c:4065
+#: readelf.c:4072
#, c-format
msgid "Shared library: [%s]"
msgstr ""
-#: readelf.c:4068
+#: readelf.c:4075
msgid " program interpreter"
msgstr ""
-#: readelf.c:4072
+#: readelf.c:4079
#, c-format
msgid "Library soname: [%s]"
msgstr ""
-#: readelf.c:4076
+#: readelf.c:4083
#, c-format
msgid "Library rpath: [%s]"
msgstr ""
-#: readelf.c:4080
+#: readelf.c:4087
#, c-format
msgid "Library runpath: [%s]"
msgstr ""
-#: readelf.c:4141
+#: readelf.c:4148
#, c-format
msgid "Not needed object: [%s]\n"
msgstr ""
-#: readelf.c:4238
+#: readelf.c:4245
#, c-format
msgid ""
"\n"
"Version definition section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:4241
+#: readelf.c:4248
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:4243 readelf.c:4431
+#: readelf.c:4250 readelf.c:4438
#, c-format
msgid " Offset: %#08lx Link: %lx (%s)\n"
msgstr ""
-#: readelf.c:4273
+#: readelf.c:4280
#, c-format
msgid " %#06x: Rev: %d Flags: %s"
msgstr ""
-#: readelf.c:4276
+#: readelf.c:4283
#, c-format
msgid " Index: %d Cnt: %d "
msgstr ""
-#: readelf.c:4287
+#: readelf.c:4294
#, c-format
msgid "Name: %s\n"
msgstr ""
-#: readelf.c:4289
+#: readelf.c:4296
#, c-format
msgid "Name index: %ld\n"
msgstr ""
-#: readelf.c:4304
+#: readelf.c:4311
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
-#: readelf.c:4307
+#: readelf.c:4314
#, c-format
msgid " %#06x: Parent %d, name index: %ld\n"
msgstr ""
-#: readelf.c:4326
+#: readelf.c:4333
#, c-format
msgid ""
"\n"
"Version needs section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:4329
+#: readelf.c:4336
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:4331
+#: readelf.c:4338
#, c-format
msgid " Offset: %#08lx Link to section: %ld (%s)\n"
msgstr ""
-#: readelf.c:4357
+#: readelf.c:4364
#, c-format
msgid " %#06x: Version: %d"
msgstr ""
-#: readelf.c:4360
+#: readelf.c:4367
#, c-format
msgid " File: %s"
msgstr ""
-#: readelf.c:4362
+#: readelf.c:4369
#, c-format
msgid " File: %lx"
msgstr ""
-#: readelf.c:4364
+#: readelf.c:4371
#, c-format
msgid " Cnt: %d\n"
msgstr ""
-#: readelf.c:4382
+#: readelf.c:4389
#, c-format
msgid " %#06x: Name: %s"
msgstr ""
-#: readelf.c:4385
+#: readelf.c:4392
#, c-format
msgid " %#06x: Name index: %lx"
msgstr ""
-#: readelf.c:4388
+#: readelf.c:4395
#, c-format
msgid " Flags: %s Version: %d\n"
msgstr ""
-#: readelf.c:4426
+#: readelf.c:4433
#, c-format
msgid ""
"\n"
"Version symbols section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:4429
+#: readelf.c:4436
msgid " Addr: "
msgstr ""
-#: readelf.c:4460
+#: readelf.c:4467
msgid " 0 (*local*) "
msgstr ""
-#: readelf.c:4464
+#: readelf.c:4471
msgid " 1 (*global*) "
msgstr ""
-#: readelf.c:4598
+#: readelf.c:4605
msgid ""
"\n"
"No version information found in this file.\n"
msgstr ""
-#: readelf.c:4616 readelf.c:4651
+#: readelf.c:4623 readelf.c:4658
#, c-format
msgid "<processor specific>: %d"
msgstr ""
-#: readelf.c:4618 readelf.c:4663
+#: readelf.c:4625 readelf.c:4670
#, c-format
msgid "<OS specific>: %d"
msgstr ""
-#: readelf.c:4620 readelf.c:4666
+#: readelf.c:4627 readelf.c:4673
#, c-format
msgid "<unknown>: %d"
msgstr ""
-#: readelf.c:4729
+#: readelf.c:4736
msgid "Unable to read in dynamic data\n"
msgstr ""
-#: readelf.c:4771
+#: readelf.c:4778
msgid "Unable to seek to start of dynamic information"
msgstr ""
-#: readelf.c:4777
+#: readelf.c:4784
msgid "Failed to read in number of buckets\n"
msgstr ""
-#: readelf.c:4783
+#: readelf.c:4790
msgid "Failed to read in number of chains\n"
msgstr ""
-#: readelf.c:4803
+#: readelf.c:4810
msgid ""
"\n"
"Symbol table for image:\n"
msgstr ""
-#: readelf.c:4805
+#: readelf.c:4812
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4807
+#: readelf.c:4814
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4851
+#: readelf.c:4858
#, c-format
msgid ""
"\n"
"Symbol table '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:4855
+#: readelf.c:4862
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4857
+#: readelf.c:4864
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4967
+#: readelf.c:4974
msgid "bad dynamic symbol"
msgstr ""
-#: readelf.c:5027
+#: readelf.c:5034
msgid ""
"\n"
"Dynamic symbol information is not available for displaying symbols.\n"
msgstr ""
-#: readelf.c:5039
+#: readelf.c:5046
#, c-format
msgid ""
"\n"
"Histogram for bucket list length (total of %d buckets):\n"
msgstr ""
-#: readelf.c:5041
+#: readelf.c:5048
msgid " Length Number %% of total Coverage\n"
msgstr ""
-#: readelf.c:5046 readelf.c:5065 readelf.c:7790 readelf.c:7983
+#: readelf.c:5053 readelf.c:5072 readelf.c:7797 readelf.c:7990
msgid "Out of memory"
msgstr ""
-#: readelf.c:5114
+#: readelf.c:5121
#, c-format
msgid ""
"\n"
"Dynamic info segment at offset 0x%lx contains %d entries:\n"
msgstr ""
-#: readelf.c:5117
+#: readelf.c:5124
msgid " Num: Name BoundTo Flags\n"
msgstr ""
-#: readelf.c:5165
+#: readelf.c:5172
#, c-format
msgid ""
"\n"
"Assembly dump of section %s\n"
msgstr ""
-#: readelf.c:5188
+#: readelf.c:5195
#, c-format
msgid ""
"\n"
"Section '%s' has no data to dump.\n"
msgstr ""
-#: readelf.c:5193
+#: readelf.c:5200
#, c-format
msgid ""
"\n"
"Hex dump of section '%s':\n"
msgstr ""
-#: readelf.c:5345
+#: readelf.c:5352
msgid "badly formed extended line op encountered!"
msgstr ""
-#: readelf.c:5352
+#: readelf.c:5359
#, c-format
msgid " Extended opcode %d: "
msgstr ""
-#: readelf.c:5357
+#: readelf.c:5364
msgid ""
"End of Sequence\n"
"\n"
msgstr ""
-#: readelf.c:5363
+#: readelf.c:5370
#, c-format
msgid "set Address to 0x%lx\n"
msgstr ""
-#: readelf.c:5368
+#: readelf.c:5375
msgid " define new File Table entry\n"
msgstr ""
-#: readelf.c:5369 readelf.c:5491
+#: readelf.c:5376 readelf.c:5498
msgid " Entry\tDir\tTime\tSize\tName\n"
msgstr ""
-#: readelf.c:5371
+#: readelf.c:5378
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:5374 readelf.c:5376 readelf.c:5378 readelf.c:5503 readelf.c:5505
-#: readelf.c:5507
+#: readelf.c:5381 readelf.c:5383 readelf.c:5385 readelf.c:5510 readelf.c:5512
+#: readelf.c:5514
#, c-format
msgid "%lu\t"
msgstr ""
-#: readelf.c:5379
+#: readelf.c:5386
#, c-format
msgid ""
"%s\n"
"\n"
msgstr ""
-#: readelf.c:5383
+#: readelf.c:5390
#, c-format
msgid "UNKNOWN: length %d\n"
msgstr ""
-#: readelf.c:5409
+#: readelf.c:5416
#, c-format
msgid ""
"\n"
@@ -3011,503 +3011,503 @@ msgid ""
"\n"
msgstr ""
-#: readelf.c:5421
+#: readelf.c:5428
msgid "The line info appears to be corrupt - the section is too small\n"
msgstr ""
-#: readelf.c:5429
+#: readelf.c:5436
msgid "Only DWARF version 2 line info is currently supported.\n"
msgstr ""
-#: readelf.c:5444
+#: readelf.c:5451
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:5445
+#: readelf.c:5452
#, c-format
msgid " DWARF Version: %d\n"
msgstr ""
-#: readelf.c:5446
+#: readelf.c:5453
#, c-format
msgid " Prolgue Length: %d\n"
msgstr ""
-#: readelf.c:5447
+#: readelf.c:5454
#, c-format
msgid " Minimum Instruction Length: %d\n"
msgstr ""
-#: readelf.c:5448
+#: readelf.c:5455
#, c-format
msgid " Initial value of 'is_stmt': %d\n"
msgstr ""
-#: readelf.c:5449
+#: readelf.c:5456
#, c-format
msgid " Line Base: %d\n"
msgstr ""
-#: readelf.c:5450
+#: readelf.c:5457
#, c-format
msgid " Line Range: %d\n"
msgstr ""
-#: readelf.c:5451
+#: readelf.c:5458
#, c-format
msgid " Opcode Base: %d\n"
msgstr ""
-#: readelf.c:5460
+#: readelf.c:5467
msgid ""
"\n"
" Opcodes:\n"
msgstr ""
-#: readelf.c:5463
+#: readelf.c:5470
#, c-format
msgid " Opcode %d has %d args\n"
msgstr ""
-#: readelf.c:5469
+#: readelf.c:5476
msgid ""
"\n"
" The Directory Table is empty.\n"
msgstr ""
-#: readelf.c:5472
+#: readelf.c:5479
msgid ""
"\n"
" The Directory Table:\n"
msgstr ""
-#: readelf.c:5476
+#: readelf.c:5483
#, c-format
msgid " %s\n"
msgstr ""
-#: readelf.c:5487
+#: readelf.c:5494
msgid ""
"\n"
" The File Name Table is empty.\n"
msgstr ""
-#: readelf.c:5490
+#: readelf.c:5497
msgid ""
"\n"
" The File Name Table:\n"
msgstr ""
-#: readelf.c:5498
+#: readelf.c:5505
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:5509
+#: readelf.c:5516
#, c-format
msgid "%s\n"
msgstr ""
#. Now display the statements.
-#: readelf.c:5517
+#: readelf.c:5524
msgid ""
"\n"
" Line Number Statements:\n"
msgstr ""
-#: readelf.c:5536
+#: readelf.c:5543
msgid " Copy\n"
msgstr ""
-#: readelf.c:5543
+#: readelf.c:5550
#, c-format
msgid " Advance PC by %d to %lx\n"
msgstr ""
-#: readelf.c:5551
+#: readelf.c:5558
#, c-format
msgid " Advance Line by %d to %d\n"
msgstr ""
-#: readelf.c:5558
+#: readelf.c:5565
#, c-format
msgid " Set File Name to entry %d in the File Name Table\n"
msgstr ""
-#: readelf.c:5566
+#: readelf.c:5573
#, c-format
msgid " Set column to %d\n"
msgstr ""
-#: readelf.c:5573
+#: readelf.c:5580
#, c-format
msgid " Set is_stmt to %d\n"
msgstr ""
-#: readelf.c:5578
+#: readelf.c:5585
msgid " Set basic block\n"
msgstr ""
-#: readelf.c:5586
+#: readelf.c:5593
#, c-format
msgid " Advance PC by constant %d to 0x%lx\n"
msgstr ""
-#: readelf.c:5594
+#: readelf.c:5601
#, c-format
msgid " Advance PC by fixed size amount %d to 0x%lx\n"
msgstr ""
-#: readelf.c:5602
+#: readelf.c:5609
#, c-format
msgid " Special opcode %d: advance Address by %d to 0x%lx"
msgstr ""
-#: readelf.c:5606
+#: readelf.c:5613
#, c-format
msgid " and Line by %d to %d\n"
msgstr ""
-#: readelf.c:5629 readelf.c:6058
+#: readelf.c:5636 readelf.c:6065
#, c-format
msgid ""
"Contents of the %s section:\n"
"\n"
msgstr ""
-#: readelf.c:5652
+#: readelf.c:5659
msgid "Only DWARF 2 pubnames are currently supported\n"
msgstr ""
-#: readelf.c:5659
+#: readelf.c:5666
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:5661
+#: readelf.c:5668
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:5663
+#: readelf.c:5670
#, c-format
msgid " Offset into .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:5665
+#: readelf.c:5672
#, c-format
msgid " Size of area in .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:5668
+#: readelf.c:5675
msgid ""
"\n"
" Offset\tName\n"
msgstr ""
-#: readelf.c:5750
+#: readelf.c:5757
#, c-format
msgid "Unknown TAG value: %lx"
msgstr ""
-#: readelf.c:5845
+#: readelf.c:5852
#, c-format
msgid "Unknown AT value: %lx"
msgstr ""
-#: readelf.c:5882
+#: readelf.c:5889
#, c-format
msgid "Unknown FORM value: %lx"
msgstr ""
-#: readelf.c:6064
+#: readelf.c:6071
msgid " Number TAG\n"
msgstr ""
-#: readelf.c:6070
+#: readelf.c:6077
#, c-format
msgid " %ld %s [%s]\n"
msgstr ""
-#: readelf.c:6073
+#: readelf.c:6080
msgid "has children"
msgstr ""
-#: readelf.c:6073
+#: readelf.c:6080
msgid "no children"
msgstr ""
-#: readelf.c:6077
+#: readelf.c:6084
#, c-format
msgid " %-18s %s\n"
msgstr ""
-#: readelf.c:6096
+#: readelf.c:6103
#, c-format
msgid " %lu byte block: "
msgstr ""
-#: readelf.c:6403
+#: readelf.c:6410
msgid "(User defined location op)"
msgstr ""
-#: readelf.c:6405
+#: readelf.c:6412
msgid "(Unknown location op)"
msgstr ""
-#: readelf.c:6532
+#: readelf.c:6539
#, c-format
msgid "Unable to handle FORM: %d"
msgstr ""
-#: readelf.c:6536
+#: readelf.c:6543
#, c-format
msgid "Unrecognised form: %d"
msgstr ""
-#: readelf.c:6549
+#: readelf.c:6556
msgid "(not inlined)"
msgstr ""
-#: readelf.c:6550
+#: readelf.c:6557
msgid "(inlined)"
msgstr ""
-#: readelf.c:6551
+#: readelf.c:6558
msgid "(declared as inline but ignored)"
msgstr ""
-#: readelf.c:6552
+#: readelf.c:6559
msgid "(declared as inline and inlined)"
msgstr ""
-#: readelf.c:6553
+#: readelf.c:6560
#, c-format
msgid " (Unknown inline attribute value: %lx)"
msgstr ""
-#: readelf.c:6682 readelf.c:6808
+#: readelf.c:6689 readelf.c:6815
#, c-format
msgid ""
"The section %s contains:\n"
"\n"
msgstr ""
-#: readelf.c:6704
+#: readelf.c:6711
#, c-format
msgid " Compilation Unit @ %lx:\n"
msgstr ""
-#: readelf.c:6705
+#: readelf.c:6712
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:6706
+#: readelf.c:6713
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:6707
+#: readelf.c:6714
#, c-format
msgid " Abbrev Offset: %ld\n"
msgstr ""
-#: readelf.c:6708
+#: readelf.c:6715
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:6712
+#: readelf.c:6719
msgid "Only version 2 DWARF debug information is currently supported.\n"
msgstr ""
-#: readelf.c:6734
+#: readelf.c:6741
msgid "Unable to locate .debug_abbrev section!\n"
msgstr ""
-#: readelf.c:6774
+#: readelf.c:6781
#, c-format
msgid "Unable to locate entry %lu in the abbreviation table\n"
msgstr ""
-#: readelf.c:6779
+#: readelf.c:6786
#, c-format
msgid " <%d><%x>: Abbrev Number: %lu (%s)\n"
msgstr ""
-#: readelf.c:6829
+#: readelf.c:6836
msgid "Only DWARF 2 aranges are currently supported.\n"
msgstr ""
-#: readelf.c:6833
+#: readelf.c:6840
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:6834
+#: readelf.c:6841
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:6835
+#: readelf.c:6842
#, c-format
msgid " Offset into .debug_info: %lx\n"
msgstr ""
-#: readelf.c:6836
+#: readelf.c:6843
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:6837
+#: readelf.c:6844
#, c-format
msgid " Segment Size: %d\n"
msgstr ""
-#: readelf.c:6839
+#: readelf.c:6846
msgid ""
"\n"
" Address Length\n"
msgstr ""
-#: readelf.c:7001
+#: readelf.c:7008
#, c-format
msgid "The section %s contains:\n"
msgstr ""
-#: readelf.c:7476
+#: readelf.c:7483
#, c-format
msgid "Displaying the debug contents of section %s is not yet supported.\n"
msgstr ""
-#: readelf.c:7540
+#: readelf.c:7547
#, c-format
msgid ""
"\n"
"Section '%s' has no debugging data.\n"
msgstr ""
-#: readelf.c:7559
+#: readelf.c:7566
#, c-format
msgid "Unrecognised debug section: %s\n"
msgstr ""
-#: readelf.c:7631
+#: readelf.c:7638
msgid "Some sections were not dumped because they do not exist!\n"
msgstr ""
-#: readelf.c:7814
+#: readelf.c:7821
#, c-format
msgid ""
"\n"
"Section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:7976
+#: readelf.c:7983
msgid "conflict list with without table"
msgstr ""
-#: readelf.c:8004
+#: readelf.c:8011
#, c-format
msgid ""
"\n"
"Section '.conflict' contains %d entries:\n"
msgstr ""
-#: readelf.c:8005
+#: readelf.c:8012
msgid " Num: Index Value Name"
msgstr ""
-#: readelf.c:8030
+#: readelf.c:8037
msgid "NT_PRSTATUS (prstatus structure)"
msgstr ""
-#: readelf.c:8031
+#: readelf.c:8038
msgid "NT_FPREGSET (floating point registers)"
msgstr ""
-#: readelf.c:8032
+#: readelf.c:8039
msgid "NT_PRPSINFO (prpsinfo structure)"
msgstr ""
-#: readelf.c:8033
+#: readelf.c:8040
msgid "NT_TASKSTRUCT (task structure)"
msgstr ""
-#: readelf.c:8034
+#: readelf.c:8041
msgid "NT_PRXFPREG (user_xfpregs structure)"
msgstr ""
-#: readelf.c:8035
+#: readelf.c:8042
msgid "NT_PSTATUS (pstatus structure)"
msgstr ""
-#: readelf.c:8036
+#: readelf.c:8043
msgid "NT_FPREGS (floating point registers)"
msgstr ""
-#: readelf.c:8037
+#: readelf.c:8044
msgid "NT_PSINFO (psinfo structure)"
msgstr ""
-#: readelf.c:8038
+#: readelf.c:8045
msgid "NT_LWPSTATUS (lwpstatus_t structure)"
msgstr ""
-#: readelf.c:8039
+#: readelf.c:8046
msgid "NT_LWPSINFO (lwpsinfo_t structure)"
msgstr ""
-#: readelf.c:8040
+#: readelf.c:8047
msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)"
msgstr ""
-#: readelf.c:8042
+#: readelf.c:8049
#, c-format
msgid "Unknown note type: (0x%08x)"
msgstr ""
-#: readelf.c:8080
+#: readelf.c:8087
#, c-format
msgid ""
"\n"
"Notes at offset 0x%08lx with length 0x%08lx:\n"
msgstr ""
-#: readelf.c:8082
+#: readelf.c:8089
msgid " Owner\t\tData size\tDescription\n"
msgstr ""
-#: readelf.c:8193
+#: readelf.c:8200
msgid "No note segments present in the core file.\n"
msgstr ""
-#: readelf.c:8271
+#: readelf.c:8278
msgid "This instance of readelf has been built without support for a\n"
msgstr ""
-#: readelf.c:8272
+#: readelf.c:8279
msgid "64 bit data type and so it cannot read 64 bit ELF files.\n"
msgstr ""
-#: readelf.c:8307
+#: readelf.c:8314
#, c-format
msgid "Cannot stat input file %s.\n"
msgstr ""
-#: readelf.c:8314
+#: readelf.c:8321
#, c-format
msgid "Input file %s not found.\n"
msgstr ""
-#: readelf.c:8320
+#: readelf.c:8327
#, c-format
msgid "%s: Failed to read file header\n"
msgstr ""
-#: readelf.c:8334
+#: readelf.c:8341
#, c-format
msgid ""
"\n"
diff --git a/binutils/readelf.c b/binutils/readelf.c
index cb346f6..ac0c09a 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -74,6 +74,7 @@
#include "elf/cris.h"
#include "elf/i860.h"
#include "elf/x86-64.h"
+#include "elf/s390.h"
#include "bucomm.h"
#include "getopt.h"
@@ -583,6 +584,7 @@ guess_is_rela (e_machine)
case EM_CRIS:
case EM_860:
case EM_X86_64:
+ case EM_S390:
return TRUE;
case EM_MMA:
@@ -938,6 +940,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
case EM_X86_64:
rtype = elf_x86_64_reloc_type (type);
break;
+
+ case EM_S390:
+ rtype = elf_s390_reloc_type (type);
+ break;
}
if (rtype == NULL)
@@ -1315,6 +1321,7 @@ get_machine_name (e_machine)
case EM_HUANY: return "Harvard Universitys's machine-independent object format";
case EM_PRISM: return "SiTera Prism";
case EM_X86_64: return "Advanced Micro Devices X86-64";
+ case EM_S390: return "IBM S/390";
default:
sprintf (buff, _("<unknown>: %x"), e_machine);
return buff;
diff --git a/config.guess b/config.guess
index b60b5a0..3b3df45 100755
--- a/config.guess
+++ b/config.guess
@@ -927,6 +927,8 @@ EOF
rm -f $dummy.c $dummy
elif test "${UNAME_MACHINE}" = "s390"; then
echo s390-ibm-linux && exit 0
+ elif test "${UNAME_MACHINE}" = "s390x"; then
+ echo s390x-ibm-linux && exit 0
elif test "${UNAME_MACHINE}" = "x86_64"; then
echo x86_64-unknown-linux-gnu && exit 0
elif test "${UNAME_MACHINE}" = "parisc64" -o "${UNAME_MACHINE}" = "hppa64"; then
diff --git a/config.sub b/config.sub
index fe8d4ac..e1afb5d 100755
--- a/config.sub
+++ b/config.sub
@@ -274,7 +274,7 @@ case $basic_machine in
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
- | f30[01]-* | f700-* | s390-* | sv1-* | t3e-* \
+ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
diff --git a/config/ChangeLog b/config/ChangeLog
index 920ab32..5a398ec 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,4 +1,9 @@
-Fri Jul 14 18:13:23 2000 Mark P Mitchell <mark@codesourcery.com>
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * mh-s390pic: New file.
+ * mt-s390pic: New file.
+
+2000-07-14 Mark P Mitchell <mark@codesourcery.com>
* mh-irix6 (CC): Don't set it.
diff --git a/config/mh-s390pic b/config/mh-s390pic
new file mode 100644
index 0000000..92e48d9
--- /dev/null
+++ b/config/mh-s390pic
@@ -0,0 +1 @@
+PICFLAG=-fpic
diff --git a/config/mt-s390pic b/config/mt-s390pic
new file mode 100644
index 0000000..ff98727
--- /dev/null
+++ b/config/mt-s390pic
@@ -0,0 +1 @@
+PICFLAG_FOR_TARGET=-fpic
diff --git a/configure.in b/configure.in
index 1284aa6..6fc1a9e 100644
--- a/configure.in
+++ b/configure.in
@@ -321,6 +321,9 @@ if [ x${shared} = xyes ]; then
powerpc*-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
;;
+ s390-* | s390x-*)
+ host_makefile_frag="${host_makefile_frag} config/mh-s390pic"
+ ;;
*-*-*)
if test -f ${srcdir}/config/mh-${host_cpu}pic; then
host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
diff --git a/gas/ChangeLog b/gas/ChangeLog
index c6babbe..f3f3800 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-09 Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * configure.in: Likewise.
+ * config/tc-s390.c: New file.
+ * config/tc-s390.h: New file.
+
2001-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/tc-sh.c (md_pseudo_table): Add uaquad. Use s_uacons for
diff --git a/gas/Makefile.am b/gas/Makefile.am
index 47b6253..f6702b2 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -65,6 +65,7 @@ CPU_TYPES = \
ns32k \
pj \
ppc \
+ s390 \
sh \
sparc \
tahoe \
@@ -246,6 +247,7 @@ TARGET_CPU_CFILES = \
config/tc-ns32k.c \
config/tc-pj.c \
config/tc-ppc.c \
+ config/tc-s390.c \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
@@ -286,6 +288,7 @@ TARGET_CPU_HFILES = \
config/tc-ns32k.h \
config/tc-pj.h \
config/tc-ppc.h \
+ config/tc-s390.h \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
@@ -1180,6 +1183,11 @@ DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.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
+DEPTC_s390_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/reloc-macros.h
DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
@@ -1507,6 +1515,10 @@ DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.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_s390_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
@@ -1772,6 +1784,9 @@ DEP_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
DEP_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h
+DEP_s390_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h
DEP_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
diff --git a/gas/Makefile.in b/gas/Makefile.in
index bd1a89e..493fb0a 100644
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -176,6 +176,7 @@ CPU_TYPES = \
ns32k \
pj \
ppc \
+ s390 \
sh \
sparc \
tahoe \
@@ -363,6 +364,7 @@ TARGET_CPU_CFILES = \
config/tc-ns32k.c \
config/tc-pj.c \
config/tc-ppc.c \
+ config/tc-s390.c \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
@@ -404,6 +406,7 @@ TARGET_CPU_HFILES = \
config/tc-ns32k.h \
config/tc-pj.h \
config/tc-ppc.h \
+ config/tc-s390.h \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
@@ -953,6 +956,12 @@ DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \
$(INCDIR)/elf/reloc-macros.h
+DEPTC_s390_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/reloc-macros.h
+
DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
@@ -1373,6 +1382,11 @@ DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/aout/aout64.h
+DEPOBJ_s390_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+
DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
@@ -1730,6 +1744,10 @@ DEP_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h
+DEP_s390_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h
+
DEP_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
diff --git a/gas/config.in b/gas/config.in
index fc7ef2b..8477871 100644
--- a/gas/config.in
+++ b/gas/config.in
@@ -163,6 +163,12 @@
/* Default architecture. */
#undef DEFAULT_ARCH
+/* Default architecture. */
+#undef DEFAULT_ARCH
+
+/* Default architecture. */
+#undef DEFAULT_ARCH
+
/* Using cgen code? */
#undef USING_CGEN
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
new file mode 100644
index 0000000..329ac1a
--- /dev/null
+++ b/gas/config/tc-s390.c
@@ -0,0 +1,1756 @@
+/* tc-s390.c -- Assemble for the S390
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include <stdio.h>
+#include <ctype.h>
+#include "as.h"
+#include "subsegs.h"
+#include "struc-symbol.h"
+
+#include "opcode/s390.h"
+#include "elf/s390.h"
+
+/* The default architecture */
+#ifndef DEFAULT_ARCH
+#define DEFAULT_ARCH "s390"
+#endif
+static char *default_arch = DEFAULT_ARCH;
+/* Either 32 or 64, selects file format. */
+static int s390_arch_size;
+/* Current architecture. Start with the smallest instruction set */
+static enum s390_opcode_arch_val current_architecture = S390_OPCODE_ESA;
+static int current_arch_mask = 1 << S390_OPCODE_ESA;
+static int current_arch_requested = 0;
+
+/* Whether to use user friendly register names. Default is true. */
+#ifndef TARGET_REG_NAMES_P
+#define TARGET_REG_NAMES_P true
+#endif
+
+static boolean reg_names_p = TARGET_REG_NAMES_P;
+
+/* Generic assembler global variables which must be defined by all
+ targets. */
+
+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
+ single line. */
+const char line_separator_chars[] = ";";
+
+/* Characters which are used to indicate an exponent in a floating
+ point number. */
+const char EXP_CHARS[] = "eE";
+
+/* Characters which mean that a number is a floating point constant,
+ as in 0d1.0. */
+const char FLT_CHARS[] = "dD";
+
+/* The target specific pseudo-ops which we support. */
+
+/* Define the prototypes for the pseudo-ops */
+static void s390_byte PARAMS ((int));
+static void s390_elf_cons PARAMS ((int));
+static void s390_bss PARAMS ((int));
+static void s390_insn PARAMS ((int));
+static void s390_literals PARAMS ((int));
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ { "align", s_align_bytes, 0 },
+ /* Pseudo-ops which must be defined. */
+ { "bss", s390_bss, 0 },
+ { "insn", s390_insn, 0 },
+ /* Pseudo-ops which must be overridden. */
+ { "byte", s390_byte, 0 },
+ { "short", s390_elf_cons, 2 },
+ { "long", s390_elf_cons, 4 },
+ { "quad", s390_elf_cons, 8 },
+ { "ltorg", s390_literals, 0 },
+ { "string", stringer, 2 },
+ { NULL, NULL, 0 }
+};
+
+
+/* Structure to hold information about predefined registers. */
+struct pd_reg
+ {
+ char *name;
+ int value;
+ };
+
+/* List of registers that are pre-defined:
+
+ Each access register has a predefined name of the form:
+ a<reg_num> which has the value <reg_num>.
+
+ Each control register has a predefined name of the form:
+ c<reg_num> which has the value <reg_num>.
+
+ Each general register has a predefined name of the form:
+ r<reg_num> which has the value <reg_num>.
+
+ Each floating point register a has predefined name of the form:
+ f<reg_num> which has the value <reg_num>.
+
+ There are individual registers as well:
+ sp has the value 15
+ lit has the value 12
+
+ The table is sorted. Suitable for searching by a binary search. */
+
+static const struct pd_reg pre_defined_registers[] =
+{
+ { "a0", 0 }, /* Access registers */
+ { "a1", 1 },
+ { "a10", 10 },
+ { "a11", 11 },
+ { "a12", 12 },
+ { "a13", 13 },
+ { "a14", 14 },
+ { "a15", 15 },
+ { "a2", 2 },
+ { "a3", 3 },
+ { "a4", 4 },
+ { "a5", 5 },
+ { "a6", 6 },
+ { "a7", 7 },
+ { "a8", 8 },
+ { "a9", 9 },
+
+ { "c0", 0 }, /* Control registers */
+ { "c1", 1 },
+ { "c10", 10 },
+ { "c11", 11 },
+ { "c12", 12 },
+ { "c13", 13 },
+ { "c14", 14 },
+ { "c15", 15 },
+ { "c2", 2 },
+ { "c3", 3 },
+ { "c4", 4 },
+ { "c5", 5 },
+ { "c6", 6 },
+ { "c7", 7 },
+ { "c8", 8 },
+ { "c9", 9 },
+
+ { "f0", 0 }, /* Floating point registers */
+ { "f1", 1 },
+ { "f10", 10 },
+ { "f11", 11 },
+ { "f12", 12 },
+ { "f13", 13 },
+ { "f14", 14 },
+ { "f15", 15 },
+ { "f2", 2 },
+ { "f3", 3 },
+ { "f4", 4 },
+ { "f5", 5 },
+ { "f6", 6 },
+ { "f7", 7 },
+ { "f8", 8 },
+ { "f9", 9 },
+
+ { "lit", 13 }, /* Pointer to literal pool */
+
+ { "r0", 0 }, /* General purpose registers */
+ { "r1", 1 },
+ { "r10", 10 },
+ { "r11", 11 },
+ { "r12", 12 },
+ { "r13", 13 },
+ { "r14", 14 },
+ { "r15", 15 },
+ { "r2", 2 },
+ { "r3", 3 },
+ { "r4", 4 },
+ { "r5", 5 },
+ { "r6", 6 },
+ { "r7", 7 },
+ { "r8", 8 },
+ { "r9", 9 },
+
+ { "sp", 15 }, /* Stack pointer */
+
+};
+
+#define REG_NAME_CNT (sizeof(pre_defined_registers) / sizeof(struct pd_reg))
+
+/* Given NAME, find the register number associated with that name, return
+ the integer value associated with the given name or -1 on failure. */
+
+static int
+reg_name_search (regs, regcount, name)
+ const struct pd_reg *regs;
+ int regcount;
+ const char *name;
+{
+ int middle, low, high;
+ int cmp;
+
+ low = 0;
+ high = regcount - 1;
+
+ do
+ {
+ middle = (low + high) / 2;
+ cmp = strcasecmp (name, regs[middle].name);
+ if (cmp < 0)
+ high = middle - 1;
+ else if (cmp > 0)
+ low = middle + 1;
+ else
+ return regs[middle].value;
+ }
+ while (low <= high);
+
+ return -1;
+}
+
+
+/*
+ * Summary of register_name().
+ *
+ * in: Input_line_pointer points to 1st char of operand.
+ *
+ * out: A expressionS.
+ * The operand may have been a register: in this case, X_op == O_register,
+ * X_add_number is set to the register number, and truth is returned.
+ * Input_line_pointer->(next non-blank) char after operand, or is in its
+ * original state.
+ */
+
+static boolean
+register_name (expressionP)
+ expressionS *expressionP;
+{
+ int reg_number;
+ char *name;
+ char *start;
+ char c;
+
+ /* Find the spelling of the operand */
+ start = name = input_line_pointer;
+ if (name[0] == '%' && isalpha (name[1]))
+ name = ++input_line_pointer;
+ else
+ return false;
+
+ c = get_symbol_end ();
+ reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name);
+
+ /* look to see if it's in the register table */
+ if (reg_number >= 0)
+ {
+ expressionP->X_op = O_register;
+ expressionP->X_add_number = reg_number;
+
+ /* make the rest nice */
+ expressionP->X_add_symbol = NULL;
+ expressionP->X_op_symbol = NULL;
+ *input_line_pointer = c; /* put back the delimiting char */
+ return true;
+ }
+ else
+ {
+ /* reset the line as if we had not done anything */
+ *input_line_pointer = c; /* put back the delimiting char */
+ input_line_pointer = start; /* reset input_line pointer */
+ return false;
+ }
+}
+
+/* Local variables. */
+
+/* Opformat hash table. */
+static struct hash_control *s390_opformat_hash;
+
+/* Opcode hash table. */
+static struct hash_control *s390_opcode_hash;
+
+/* Flags to set in the elf header */
+static flagword s390_flags = 0;
+
+symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+
+#ifndef WORKING_DOT_WORD
+const int md_short_jump_size = 4;
+const int md_long_jump_size = 4;
+#endif
+
+CONST char *md_shortopts = "A:m:kVQ:";
+struct option md_longopts[] = {
+ {NULL, no_argument, NULL, 0}
+};
+size_t md_longopts_size = sizeof(md_longopts);
+
+/* Initialize the default opcode arch and word size from the default
+ architecture name. */
+static void
+init_default_arch ()
+{
+ if (current_arch_requested)
+ return;
+ if (strcmp(default_arch, "s390") == 0) {
+ s390_arch_size = 32;
+ current_architecture = S390_OPCODE_ESA;
+ } else if (strcmp(default_arch, "s390x") == 0) {
+ s390_arch_size = 64;
+ current_architecture = S390_OPCODE_ESAME;
+ } else
+ as_fatal ("Invalid default architecture, broken assembler.");
+ current_arch_mask = 1 << current_architecture;
+}
+
+/* Called by TARGET_FORMAT. */
+const char *
+s390_target_format ()
+{
+ /* We don't get a chance to initialize anything before we're called,
+ so handle that now. */
+ if (! s390_arch_size)
+ init_default_arch ();
+
+ return s390_arch_size == 64 ? "elf64-s390" : "elf32-s390";
+}
+
+int
+md_parse_option (c, arg)
+ int c;
+ char *arg;
+{
+ switch (c) {
+ /* -k: Ignore for FreeBSD compatibility. */
+ case 'k':
+ break;
+ case 'm':
+ if (arg != NULL && strcmp (arg, "regnames") == 0)
+ reg_names_p = true;
+
+ else if (arg != NULL && strcmp (arg, "no-regnames") == 0)
+ reg_names_p = false;
+
+ else {
+ as_bad (_("invalid switch -m%s"), arg);
+ return 0;
+ }
+ break;
+
+ case 'A':
+ if (arg != NULL && strcmp (arg, "esa") == 0) {
+ current_architecture = S390_OPCODE_ESA;
+ s390_arch_size = 32;
+ } else if (arg != NULL && strcmp (arg, "esame") == 0) {
+ current_architecture = S390_OPCODE_ESAME;
+ s390_arch_size = 64;
+ } else
+ as_bad ("invalid architecture -A%s", arg);
+ current_arch_mask = 1 << current_architecture;
+ current_arch_requested = 1;
+ break;
+
+ /* -V: SVR4 argument to print version ID. */
+ case 'V':
+ print_version_id ();
+ break;
+
+ /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section
+ should be emitted or not. FIXME: Not implemented. */
+ case 'Q':
+ break;
+
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+void
+md_show_usage (stream)
+ FILE *stream;
+{
+ fprintf(stream, _("\
+ S390 options:\n\
+ -mregnames \tAllow symbolic names for registers\n\
+ -mno-regnames\tDo not allow symbolic names for registers\n"));
+ fprintf(stream, _("\
+ -V \tprint assembler version number\n\
+ -Qy, -Qn \tignored\n"));
+}
+
+/* This function is called when the assembler starts up. It is called
+ after the options have been parsed and the output file has been
+ opened. */
+
+void
+md_begin ()
+{
+ register const struct s390_opcode *op;
+ const struct s390_opcode *op_end;
+ boolean dup_insn = false;
+ const char *retval;
+
+ /* Set the ELF flags if desired. */
+ if (s390_flags)
+ bfd_set_private_flags (stdoutput, s390_flags);
+
+ /* Insert the opcode formats into a hash table. */
+ s390_opformat_hash = hash_new ();
+
+ op_end = s390_opformats + s390_num_opformats;
+ for (op = s390_opformats; op < op_end; op++) {
+ retval = hash_insert (s390_opformat_hash, op->name, (PTR) op);
+ if (retval != (const char *) NULL)
+ {
+ as_bad (_("Internal assembler error for instruction format %s"),
+ op->name);
+ dup_insn = true;
+ }
+ }
+
+ /* Insert the opcodes into a hash table. */
+ s390_opcode_hash = hash_new ();
+
+ op_end = s390_opcodes + s390_num_opcodes;
+ for (op = s390_opcodes; op < op_end; op++) {
+ retval = hash_insert (s390_opcode_hash, op->name, (PTR) op);
+ if (retval != (const char *) NULL)
+ {
+ as_bad (_("Internal assembler error for instruction %s"), op->name);
+ dup_insn = true;
+ }
+ }
+
+ if (dup_insn)
+ abort ();
+
+ record_alignment (text_section, 2);
+ record_alignment (data_section, 2);
+ record_alignment (bss_section, 2);
+
+}
+
+/* Called after all assembly has been done. */
+void
+s390_md_end ()
+{
+ if (s390_arch_size == 64) {
+ bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esame);
+ } else {
+ bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esa);
+ }
+}
+
+void
+s390_align_code (fragP, count)
+ fragS *fragP;
+ int count;
+{
+ /* We use nop pattern 0x0707. */
+ if (count > 0) {
+ memset(fragP->fr_literal + fragP->fr_fix, 0x07, count);
+ fragP->fr_var = count;
+ }
+}
+
+/* Insert an operand value into an instruction. */
+
+static void
+s390_insert_operand (insn, operand, val, file, line)
+ unsigned char *insn;
+ const struct s390_operand *operand;
+ offsetT val;
+ char *file;
+ unsigned int line;
+{
+ addressT uval;
+ int offset;
+
+ if (operand->flags & (S390_OPERAND_SIGNED|S390_OPERAND_PCREL)) {
+ offsetT min, max;
+
+ max = ((offsetT) 1 << (operand->bits - 1)) - 1;
+ min = - ((offsetT) 1 << (operand->bits - 1));
+ /* Halve PCREL operands. */
+ if (operand->flags & S390_OPERAND_PCREL)
+ val >>= 1;
+ /* Check for underflow / overflow. */
+ if (val < min || val > max) {
+ const char *err =
+ "operand out of range (%s not between %ld and %ld)";
+ char buf[100];
+
+ if (operand->flags & S390_OPERAND_PCREL) {
+ val <<= 1;
+ min <<= 1;
+ max <<= 1;
+ }
+ sprint_value (buf, val);
+ if (file == (char *) NULL)
+ as_bad (err, buf, (int) min, (int) max);
+ else
+ as_bad_where (file, line, err, buf, (int) min, (int) max);
+ return;
+ }
+ /* val is ok, now restrict it to operand->bits bits. */
+ uval = (addressT) val & ((((addressT) 1 << (operand->bits-1)) << 1) - 1);
+ } else {
+ addressT min, max;
+
+ max = (((addressT) 1 << (operand->bits - 1))<<1) - 1;
+ min = (offsetT) 0;
+ uval = (addressT) val;
+ /* Length x in an instructions has real length x+1. */
+ if (operand->flags & S390_OPERAND_LENGTH)
+ uval--;
+ /* Check for underflow / overflow. */
+ if (uval < min || uval > max) {
+ const char *err =
+ "operand out of range (%s not between %ld and %ld)";
+ char buf[100];
+
+ if (operand->flags & S390_OPERAND_LENGTH) {
+ uval++;
+ min++;
+ max++;
+ }
+ sprint_value (buf, uval);
+ if (file == (char *) NULL)
+ as_bad (err, buf, (int) min, (int) max);
+ else
+ as_bad_where (file, line, err, buf, (int) min, (int) max);
+ return;
+ }
+ }
+
+ /* Insert fragments of the operand byte for byte. */
+ offset = operand->shift + operand->bits;
+ uval <<= (-offset) & 7;
+ insn += (offset - 1)/8;
+ while (uval != 0) {
+ *insn-- |= uval;
+ uval >>= 8;
+ }
+}
+
+/* Structure used to hold suffixes. */
+typedef enum {
+ ELF_SUFFIX_NONE = 0,
+ ELF_SUFFIX_GOT,
+ ELF_SUFFIX_PLT,
+ ELF_SUFFIX_GOTENT
+} elf_suffix_type;
+
+struct map_bfd {
+ char *string;
+ int length;
+ elf_suffix_type suffix;
+};
+
+/* Parse @got/@plt/@gotoff. and return the desired relocation. */
+static elf_suffix_type
+s390_elf_suffix (str_p, exp_p)
+ char **str_p;
+ expressionS *exp_p;
+{
+ static struct map_bfd mapping[] = {
+ { "got", 3, ELF_SUFFIX_GOT },
+ { "got12", 5, ELF_SUFFIX_GOT },
+ { "plt", 3, ELF_SUFFIX_PLT },
+ { "gotent", 6, ELF_SUFFIX_GOTENT },
+ { NULL, 0, ELF_SUFFIX_NONE }
+ };
+
+ struct map_bfd *ptr;
+ char *str = *str_p;
+ char *ident;
+ int len;
+
+ if (*str++ != '@')
+ return ELF_SUFFIX_NONE;
+
+ ident = str;
+ while (isalnum(*str))
+ str++;
+ len = str - ident;
+
+ for (ptr = &mapping[0]; ptr->length > 0; ptr++)
+ if (len == ptr->length &&
+ strncasecmp(ident, ptr->string, ptr->length) == 0) {
+ if (exp_p->X_add_number != 0)
+ as_warn (_("identifier+constant@%s means identifier@%s+constant"),
+ ptr->string, ptr->string);
+ /* Now check for identifier@suffix+constant. */
+ if (*str == '-' || *str == '+') {
+ char *orig_line = input_line_pointer;
+ expressionS new_exp;
+
+ input_line_pointer = str;
+ expression (&new_exp);
+
+ switch (new_exp.X_op) {
+ case O_constant: /* X_add_number (a constant expression). */
+ exp_p->X_add_number += new_exp.X_add_number;
+ str = input_line_pointer;
+ break;
+ case O_symbol: /* X_add_symbol + X_add_number. */
+ /* this case is used for e.g. xyz@PLT+.Label. */
+ exp_p->X_add_number += new_exp.X_add_number;
+ exp_p->X_op_symbol = new_exp.X_add_symbol;
+ exp_p->X_op = O_add;
+ str = input_line_pointer;
+ break;
+ case O_uminus: /* (- X_add_symbol) + X_add_number. */
+ /* this case is used for e.g. xyz@PLT-.Label. */
+ exp_p->X_add_number += new_exp.X_add_number;
+ exp_p->X_op_symbol = new_exp.X_add_symbol;
+ exp_p->X_op = O_subtract;
+ str = input_line_pointer;
+ break;
+ default:
+ break;
+ }
+
+ /* If s390_elf_suffix has not been called with
+ &input_line_pointer as first parameter, we have
+ clobbered the input_line_pointer. We have to
+ undo that. */
+ if (&input_line_pointer != str_p)
+ input_line_pointer = orig_line;
+ }
+ *str_p = str;
+ return ptr->suffix;
+ }
+
+ return BFD_RELOC_UNUSED;
+}
+
+/* Structure used to hold a literal pool entry. */
+struct s390_lpe {
+ struct s390_lpe *next;
+ expressionS ex;
+ FLONUM_TYPE floatnum; /* used if X_op == O_big && X_add_number <= 0 */
+ LITTLENUM_TYPE bignum[4]; /* used if X_op == O_big && X_add_number > 0 */
+ int nbytes;
+ bfd_reloc_code_real_type reloc;
+ symbolS *sym;
+};
+
+static struct s390_lpe *lpe_free_list = NULL;
+static struct s390_lpe *lpe_list = NULL;
+static struct s390_lpe *lpe_list_tail = NULL;
+static symbolS *lp_sym = NULL;
+static int lp_count = 0;
+static int lpe_count = 0;
+
+static int
+s390_exp_compare(exp1, exp2)
+ expressionS *exp1;
+ expressionS *exp2;
+{
+ if (exp1->X_op != exp2->X_op)
+ return 0;
+
+ switch (exp1->X_op) {
+ case O_constant: /* X_add_number must be equal. */
+ case O_register:
+ return exp1->X_add_number == exp2->X_add_number;
+
+ case O_big:
+ as_bad(_("Can't handle O_big in s390_exp_compare"));
+
+ case O_symbol: /* X_add_symbol & X_add_number must be equal. */
+ case O_symbol_rva:
+ case O_uminus:
+ case O_bit_not:
+ case O_logical_not:
+ return (exp1->X_add_symbol == exp2->X_add_symbol) &&
+ (exp1->X_add_number == exp2->X_add_number);
+
+ case O_multiply: /* X_add_symbol,X_op_symbol&X_add_number must be equal. */
+ case O_divide:
+ case O_modulus:
+ case O_left_shift:
+ case O_right_shift:
+ case O_bit_inclusive_or:
+ case O_bit_or_not:
+ case O_bit_exclusive_or:
+ case O_bit_and:
+ case O_add:
+ case O_subtract:
+ case O_eq:
+ case O_ne:
+ case O_lt:
+ case O_le:
+ case O_ge:
+ case O_gt:
+ case O_logical_and:
+ case O_logical_or:
+ return (exp1->X_add_symbol == exp2->X_add_symbol) &&
+ (exp1->X_op_symbol == exp2->X_op_symbol) &&
+ (exp1->X_add_number == exp2->X_add_number);
+ default:
+ return 0;
+ }
+}
+
+/* Test for @lit and if its present make an entry in the literal pool and
+ modify the current expression to be an offset into the literal pool. */
+static elf_suffix_type
+s390_lit_suffix (str_p, exp_p, suffix)
+ char **str_p;
+ expressionS *exp_p;
+ elf_suffix_type suffix;
+{
+ bfd_reloc_code_real_type reloc;
+ char tmp_name[64];
+ char *str = *str_p;
+ char *ident;
+ struct s390_lpe *lpe;
+ int nbytes, len;
+
+ if (*str++ != ':')
+ return suffix; /* No modification. */
+
+ /* We look for a suffix of the form "@lit1", "@lit2", "@lit4" or "@lit8". */
+ ident = str;
+ while (isalnum(*str))
+ str++;
+ len = str - ident;
+ if (len != 4 || strncasecmp(ident, "lit", 3) != 0 ||
+ (ident[3]!='1' && ident[3]!='2' && ident[3]!='4' && ident[3]!='8'))
+ return suffix; /* no modification */
+ nbytes = ident[3] - '0';
+
+ reloc = BFD_RELOC_UNUSED;
+ if (suffix == ELF_SUFFIX_GOT) {
+ if (nbytes == 2)
+ reloc = BFD_RELOC_390_GOT16;
+ else if (nbytes == 4)
+ reloc = BFD_RELOC_32_GOT_PCREL;
+ else if (nbytes == 8)
+ reloc = BFD_RELOC_390_GOT64;
+ } else if (suffix == ELF_SUFFIX_PLT) {
+ if (nbytes == 4)
+ reloc = BFD_RELOC_390_PLT32;
+ else if (nbytes == 8)
+ reloc = BFD_RELOC_390_PLT64;
+ }
+
+ if (suffix != ELF_SUFFIX_NONE && reloc == BFD_RELOC_UNUSED) {
+ as_bad (_("Invalid suffix for literal pool entry"));
+ }
+
+ /* Search the pool if the new entry is a duplicate. */
+ if (exp_p->X_op == O_big) {
+ /* Special processing for big numbers. */
+ for (lpe = lpe_list; lpe != NULL; lpe = lpe->next) {
+ if (lpe->ex.X_op == O_big) {
+ if (exp_p->X_add_number <= 0 && lpe->ex.X_add_number <= 0) {
+ if (memcmp(&generic_floating_point_number, &lpe->floatnum,
+ sizeof(FLONUM_TYPE)) == 0)
+ break;
+ } else if (exp_p->X_add_number == lpe->ex.X_add_number) {
+ if (memcmp(generic_bignum, lpe->bignum,
+ sizeof(LITTLENUM_TYPE)*exp_p->X_add_number) == 0)
+ break;
+ }
+ }
+ }
+ } else {
+ /* Processing for 'normal' data types. */
+ for (lpe = lpe_list; lpe != NULL; lpe = lpe->next)
+ if (lpe->nbytes == nbytes && lpe->reloc == reloc &&
+ s390_exp_compare(exp_p, &lpe->ex) != 0)
+ break;
+ }
+ if (lpe == NULL) { /* A new literal. */
+ if (lpe_free_list != NULL) {
+ lpe = lpe_free_list;
+ lpe_free_list = lpe_free_list->next;
+ } else {
+ lpe = (struct s390_lpe *) xmalloc(sizeof(struct s390_lpe));
+ }
+ lpe->ex = *exp_p;
+ if (exp_p->X_op == O_big) {
+ if (exp_p->X_add_number <= 0)
+ lpe->floatnum = generic_floating_point_number;
+ else if (exp_p->X_add_number <= 4)
+ memcpy(lpe->bignum, generic_bignum,
+ exp_p->X_add_number*sizeof(LITTLENUM_TYPE));
+ else
+ as_bad(_("Big number is too big"));
+ }
+ lpe->nbytes = nbytes;
+ lpe->reloc = reloc;
+ /* Literal pool name defined ? */
+ if (lp_sym == NULL) {
+ sprintf(tmp_name, ".L\001%i", lp_count);
+ lp_sym = symbol_make(tmp_name);
+ }
+ /* Make name for literal pool entry. */
+ sprintf(tmp_name, ".L\001%i\002%i", lp_count, lpe_count);
+ lpe_count++;
+ lpe->sym = symbol_make(tmp_name);
+ /* Add to literal pool list. */
+ lpe->next = NULL;
+ if (lpe_list_tail != NULL) {
+ lpe_list_tail->next = lpe;
+ lpe_list_tail = lpe;
+ } else
+ lpe_list = lpe_list_tail = lpe;
+ }
+
+ /* Now change exp_p to the offset into the literal pool.
+ Thats the expression: .L^Ax^By-.L^Ax */
+ exp_p->X_add_symbol = lpe->sym;
+ exp_p->X_op_symbol = lp_sym;
+ exp_p->X_op = O_subtract;
+ exp_p->X_add_number = 0;
+
+ *str_p = str;
+
+ /* We change the suffix type to ELF_SUFFIX_NONE, because
+ the difference of two local labels is just a number. */
+ return ELF_SUFFIX_NONE;
+}
+
+/* Like normal .long/.short/.word, except support @got, etc.
+ clobbers input_line_pointer, checks end-of-line. */
+static void
+s390_elf_cons (nbytes)
+ register int nbytes; /* 1=.byte, 2=.word, 4=.long */
+{
+ expressionS exp;
+ elf_suffix_type suffix;
+
+ if (is_it_end_of_statement ()) {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ do {
+ expression (&exp);
+ if (exp.X_op == O_symbol && *input_line_pointer == '@' &&
+ (suffix=s390_elf_suffix(&input_line_pointer, &exp))!=ELF_SUFFIX_NONE) {
+ bfd_reloc_code_real_type reloc;
+ reloc_howto_type *reloc_howto;
+ int size;
+ char *where;
+
+ if (nbytes == 2 && suffix == ELF_SUFFIX_GOT)
+ reloc = BFD_RELOC_390_GOT16;
+ else if (nbytes == 4 && suffix == ELF_SUFFIX_GOT)
+ reloc = BFD_RELOC_32_GOT_PCREL;
+ else if (nbytes == 8 && suffix == ELF_SUFFIX_GOT)
+ reloc = BFD_RELOC_390_GOT64;
+ else if (nbytes == 4 && suffix == ELF_SUFFIX_PLT)
+ reloc = BFD_RELOC_390_PLT32;
+ else if (nbytes == 8 && suffix == ELF_SUFFIX_PLT)
+ reloc = BFD_RELOC_390_PLT64;
+ else
+ reloc = BFD_RELOC_UNUSED;
+
+ if (reloc != BFD_RELOC_UNUSED) {
+ reloc_howto = bfd_reloc_type_lookup (stdoutput, reloc);
+ size = bfd_get_reloc_size (reloc_howto);
+ if (size > nbytes)
+ as_bad (_("%s relocations do not fit in %d bytes"),
+ reloc_howto->name, nbytes);
+ where = frag_more(nbytes);
+ md_number_to_chars (where, 0, size);
+ fix_new_exp (frag_now, where - frag_now->fr_literal,
+ size, &exp, reloc_howto->pc_relative, reloc);
+ } else
+ as_bad (_("relocation not applicable"));
+ } else
+ emit_expr (&exp, (unsigned int) nbytes);
+ } while (*input_line_pointer++ == ',');
+
+ input_line_pointer--; /* Put terminator back into stream. */
+ demand_empty_rest_of_line ();
+}
+
+/* We need to keep a list of fixups. We can't simply generate them as
+ we go, because that would require us to first create the frag, and
+ that would screw up references to ``.''. */
+
+struct s390_fixup
+{
+ expressionS exp;
+ int opindex;
+ bfd_reloc_code_real_type reloc;
+};
+
+#define MAX_INSN_FIXUPS (4)
+
+/* This routine is called for each instruction to be assembled. */
+
+char *
+md_gather_operands (str, insn, opcode)
+ char *str;
+ unsigned char *insn;
+ const struct s390_opcode *opcode;
+{
+ struct s390_fixup fixups[MAX_INSN_FIXUPS];
+ const struct s390_operand *operand;
+ const unsigned char *opindex_ptr;
+ elf_suffix_type suffix;
+ bfd_reloc_code_real_type reloc;
+ int skip_optional;
+ int parentheses;
+ char *f;
+ int fc, i;
+
+ while (isspace(*str)) str++;
+
+ parentheses = 0;
+ skip_optional = 0;
+
+ /* Gather the operands. */
+ fc = 0;
+ for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++) {
+ expressionS ex;
+ char *hold;
+
+ operand = s390_operands + *opindex_ptr;
+
+ if (skip_optional && (operand->flags & S390_OPERAND_INDEX)) {
+ /* We do an early skip. For D(X,B) constructions the index
+ register is skipped (X is optional). For D(L,B) the base
+ register will be the skipped operand, because L is NOT
+ optional. */
+ skip_optional = 0;
+ continue;
+ }
+
+ /* Gather the operand. */
+ hold = input_line_pointer;
+ input_line_pointer = str;
+
+ if (! register_name (&ex)) /* parse the operand */
+ expression (&ex);
+
+ str = input_line_pointer;
+ input_line_pointer = hold;
+
+ /* Write the operand to the insn. */
+ if (ex.X_op == O_illegal)
+ as_bad (_("illegal operand"));
+ else if (ex.X_op == O_absent)
+ as_bad (_("missing operand"));
+ else if (ex.X_op == O_register || ex.X_op == O_constant) {
+ s390_lit_suffix (&str, &ex, ELF_SUFFIX_NONE);
+ if (ex.X_op != O_register && ex.X_op != O_constant) {
+ /* We need to generate a fixup for the
+ expression returned by s390_lit_suffix. */
+ if (fc >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+ fixups[fc].exp = ex;
+ fixups[fc].opindex = *opindex_ptr;
+ fixups[fc].reloc = BFD_RELOC_UNUSED;
+ ++fc;
+ } else {
+ if ((operand->flags & S390_OPERAND_INDEX) && ex.X_add_number == 0)
+ as_warn("index register specified but zero");
+ if ((operand->flags & S390_OPERAND_BASE) && ex.X_add_number == 0)
+ as_warn("base register specified but zero");
+ s390_insert_operand (insn, operand, ex.X_add_number, NULL, 0);
+ }
+ } else {
+ suffix = s390_elf_suffix (&str, &ex);
+ suffix = s390_lit_suffix (&str, &ex, suffix);
+ reloc = BFD_RELOC_UNUSED;
+ if (suffix == ELF_SUFFIX_GOT) {
+ if (operand->flags & S390_OPERAND_DISP)
+ reloc = BFD_RELOC_390_GOT12;
+ else if ((operand->flags & S390_OPERAND_SIGNED) &&
+ (operand->bits == 16))
+ reloc = BFD_RELOC_390_GOT16;
+ else if ((operand->flags & S390_OPERAND_PCREL) &&
+ (operand->bits == 32))
+ reloc = BFD_RELOC_390_GOTENT;
+ } else if (suffix == ELF_SUFFIX_PLT) {
+ if ((operand->flags & S390_OPERAND_PCREL) &&
+ (operand->bits == 16))
+ reloc = BFD_RELOC_390_PLT16DBL;
+ else if ((operand->flags & S390_OPERAND_PCREL) &&
+ (operand->bits == 32))
+ reloc = BFD_RELOC_390_PLT32DBL;
+ } else if (suffix == ELF_SUFFIX_GOTENT) {
+ if ((operand->flags & S390_OPERAND_PCREL) &&
+ (operand->bits == 32))
+ reloc = BFD_RELOC_390_GOTENT;
+ }
+
+ if (suffix != ELF_SUFFIX_NONE && reloc == BFD_RELOC_UNUSED)
+ as_bad (_("invalid operand suffix"));
+ /* We need to generate a fixup of type 'reloc' for this
+ expression. */
+ if (fc >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+ fixups[fc].exp = ex;
+ fixups[fc].opindex = *opindex_ptr;
+ fixups[fc].reloc = reloc;
+ ++fc;
+ }
+
+ /* Check the next character. The call to expression has advanced
+ str past any whitespace. */
+ if (operand->flags & S390_OPERAND_DISP) {
+ /* After a displacement a block in parentheses can start. */
+ if (*str != '(') {
+ /* Check if parethesed block can be skipped. If the next
+ operand is neiter an optional operand nor a base register
+ then we have a syntax error. */
+ operand = s390_operands + *(++opindex_ptr);
+ if (!(operand->flags & (S390_OPERAND_INDEX|S390_OPERAND_BASE)))
+ as_bad (_("syntax error; missing '(' after displacement"));
+
+ /* Ok, skip all operands until S390_OPERAND_BASE. */
+ while (!(operand->flags & S390_OPERAND_BASE))
+ operand = s390_operands + *(++opindex_ptr);
+
+ /* If there is a next operand it must be seperated by a comma. */
+ if (opindex_ptr[1] != '\0') {
+ if (*str++ != ',')
+ as_bad(_("syntax error; expected ,"));
+ }
+ } else { /* We found an opening parentheses. */
+ str++;
+ for (f = str; *f != '\0'; f++)
+ if (*f == ',' || *f == ')')
+ break;
+ /* If there is no comma until the closing parentheses OR
+ there is a comma right after the opening parentheses,
+ we have to skip optional operands. */
+ if (*f == ',' && f == str) { /* comma directly after '(' ? */
+ skip_optional = 1;
+ str++;
+ } else
+ skip_optional = (*f != ',');
+ }
+ } else if (operand->flags & S390_OPERAND_BASE) {
+ /* After the base register the parenthesed block ends. */
+ if (*str++ != ')')
+ as_bad(_("syntax error; missing ')' after base register"));
+ skip_optional = 0;
+ /* If there is a next operand it must be seperated by a comma. */
+ if (opindex_ptr[1] != '\0') {
+ if (*str++ != ',')
+ as_bad(_("syntax error; expected ,"));
+ }
+ } else {
+ /* We can find an 'early' closing parentheses in e.g. D(L) instead
+ of D(L,B). In this case the base register has to be skipped. */
+ if (*str == ')') {
+ operand = s390_operands + *(++opindex_ptr);
+ if (!(operand->flags & S390_OPERAND_BASE))
+ as_bad (_("syntax error; ')' not allowed here"));
+ str++;
+ }
+ /* If there is a next operand it must be seperated by a comma. */
+ if (opindex_ptr[1] != '\0') {
+ if (*str++ != ',')
+ as_bad(_("syntax error; expected ,"));
+ }
+ }
+ }
+
+ while (isspace (*str))
+ ++str;
+
+ if (*str != '\0') {
+ char *linefeed;
+
+ if ((linefeed = strchr(str, '\n')) != NULL)
+ *linefeed = '\0';
+ as_bad (_("junk at end of line: `%s'"), str);
+ if (linefeed != NULL)
+ *linefeed = '\n';
+ }
+
+ /* Write out the instruction. */
+ f = frag_more (opcode->oplen);
+ memcpy(f, insn, opcode->oplen);
+
+ /* Create any fixups. At this point we do not use a
+ bfd_reloc_code_real_type, but instead just use the
+ BFD_RELOC_UNUSED plus the operand index. This lets us easily
+ handle fixups for any operand type, although that is admittedly
+ not a very exciting feature. We pick a BFD reloc type in
+ md_apply_fix3. */
+ for (i = 0; i < fc; i++) {
+ operand = s390_operands + fixups[i].opindex;
+
+ if (fixups[i].reloc != BFD_RELOC_UNUSED) {
+ reloc_howto_type *reloc_howto;
+ fixS *fixP;
+ int size;
+
+ reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
+ if (!reloc_howto)
+ abort ();
+
+ size = bfd_get_reloc_size (reloc_howto);
+
+ if (size < 1 || size > 4)
+ abort();
+
+ fixP = fix_new_exp (frag_now,
+ f - frag_now->fr_literal + (operand->shift/8),
+ size, &fixups[i].exp, reloc_howto->pc_relative,
+ fixups[i].reloc);
+ /* Turn off overflow checking in fixup_segment. This is necessary
+ because fixup_segment will signal an overflow for large 4 byte
+ quantities for GOT12 relocations. */
+ if (fixups[i].reloc == BFD_RELOC_390_GOT12 ||
+ fixups[i].reloc == BFD_RELOC_390_GOT16)
+ fixP->fx_no_overflow = 1;
+ } else
+ fix_new_exp (frag_now, f - frag_now->fr_literal, 4, &fixups[i].exp,
+ (operand->flags & S390_OPERAND_PCREL) != 0,
+ ((bfd_reloc_code_real_type)
+ (fixups[i].opindex + (int) BFD_RELOC_UNUSED)));
+ }
+ return str;
+}
+
+/* This routine is called for each instruction to be assembled. */
+
+void
+md_assemble (str)
+ char *str;
+{
+ const struct s390_opcode *opcode;
+ unsigned char insn[6];
+ char *s;
+
+ /* Get the opcode. */
+ for (s = str; *s != '\0' && ! isspace (*s); s++)
+ ;
+ if (*s != '\0')
+ *s++ = '\0';
+
+ /* Look up the opcode in the hash table. */
+ opcode = (struct s390_opcode *) hash_find (s390_opcode_hash, str);
+ if (opcode == (const struct s390_opcode *) NULL) {
+ as_bad (_("Unrecognized opcode: `%s'"), str);
+ return;
+ } else if (!(opcode->architecture & current_arch_mask)) {
+ as_bad("Opcode %s not available in this architecture", str);
+ return;
+ }
+
+ memcpy(insn, opcode->opcode, sizeof(insn));
+ md_gather_operands(s, insn, opcode);
+}
+
+#ifndef WORKING_DOT_WORD
+/* Handle long and short jumps. We don't support these */
+void
+md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
+ char *ptr;
+ addressT from_addr, to_addr;
+ fragS *frag;
+ symbolS *to_symbol;
+{
+ abort ();
+}
+
+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;
+{
+ abort ();
+}
+#endif
+
+void
+s390_bss (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ /* We don't support putting frags in the BSS segment, we fake it
+ by marking in_bss, then looking at s_skip for clues. */
+
+ subseg_set (bss_section, 0);
+ demand_empty_rest_of_line ();
+}
+
+/* Pseudo-op handling. */
+
+void
+s390_insn(ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ expressionS exp;
+ const struct s390_opcode *opformat;
+ unsigned char insn[6];
+ char *s;
+
+ /* Get the opcode format. */
+ s = input_line_pointer;
+ while (*s != '\0' && *s != ',' && ! isspace (*s))
+ s++;
+ if (*s != ',')
+ as_bad (_("Invalid .insn format\n"));
+ *s++ = '\0';
+
+ /* Look up the opcode in the hash table. */
+ opformat = (struct s390_opcode *)
+ hash_find (s390_opformat_hash, input_line_pointer);
+ if (opformat == (const struct s390_opcode *) NULL) {
+ as_bad (_("Unrecognized opcode format: `%s'"), input_line_pointer);
+ return;
+ }
+ input_line_pointer = s;
+ expression (&exp);
+ if (exp.X_op == O_constant) {
+ if (opformat->oplen == 4 ||
+ (opformat->oplen == 2 && exp.X_op < 0x10000))
+ md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
+ else
+ as_bad(_("Invalid .insn format\n"));
+ } else if (exp.X_op == O_big) {
+ if (exp.X_add_number > 0 &&
+ opformat->oplen == 6 &&
+ generic_bignum[3] == 0) {
+ md_number_to_chars (insn, generic_bignum[2], 2);
+ md_number_to_chars (&insn[2], generic_bignum[1], 2);
+ md_number_to_chars (&insn[4], generic_bignum[0], 2);
+ } else
+ as_bad(_("Invalid .insn format\n"));
+ } else
+ as_bad (_("second operand of .insn not a constant\n"));
+ if (*input_line_pointer++ != ',')
+ as_bad (_("missing comma after insn constant\n"));
+
+ if ((s = strchr(input_line_pointer, '\n')) != NULL)
+ *s = '\0';
+ input_line_pointer = md_gather_operands (input_line_pointer, insn, opformat);
+ if (s != NULL)
+ *s = '\n';
+ demand_empty_rest_of_line ();
+}
+
+/* The .byte pseudo-op. This is similar to the normal .byte
+ pseudo-op, but it can also take a single ASCII string. */
+
+static void
+s390_byte (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ if (*input_line_pointer != '\"')
+ {
+ cons (1);
+ return;
+ }
+
+ /* Gather characters. A real double quote is doubled. Unusual
+ characters are not permitted. */
+ ++input_line_pointer;
+ while (1)
+ {
+ char c;
+
+ c = *input_line_pointer++;
+
+ if (c == '\"')
+ {
+ if (*input_line_pointer != '\"')
+ break;
+ ++input_line_pointer;
+ }
+
+ FRAG_APPEND_1_CHAR (c);
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* The .ltorg pseudo-op.This emits all literals defined since the last
+ .ltorg or the invocation of gas. Literals are defined with the
+ @lit suffix. */
+
+static void
+s390_literals (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ struct s390_lpe *lpe;
+
+ if (lp_sym == NULL || lpe_count == 0)
+ return; /* nothing to be done */
+
+ /* Emit symbol for start of literal pool. */
+ S_SET_SEGMENT (lp_sym, now_seg);
+ S_SET_VALUE (lp_sym, (valueT) frag_now_fix ());
+ lp_sym->sy_frag = frag_now;
+
+ while (lpe_list) {
+ lpe = lpe_list;
+ lpe_list = lpe_list->next;
+ S_SET_SEGMENT (lpe->sym, now_seg);
+ S_SET_VALUE (lpe->sym, (valueT) frag_now_fix ());
+ lpe->sym->sy_frag = frag_now;
+
+ /* Emit literal pool entry. */
+ if (lpe->reloc != BFD_RELOC_UNUSED) {
+ reloc_howto_type *reloc_howto =
+ bfd_reloc_type_lookup (stdoutput, lpe->reloc);
+ int size = bfd_get_reloc_size (reloc_howto);
+ char *where;
+
+ if (size > lpe->nbytes)
+ as_bad (_("%s relocations do not fit in %d bytes"),
+ reloc_howto->name, lpe->nbytes);
+ where = frag_more(lpe->nbytes);
+ md_number_to_chars (where, 0, size);
+ fix_new_exp (frag_now, where - frag_now->fr_literal,
+ size, &lpe->ex, reloc_howto->pc_relative, lpe->reloc);
+ } else {
+ if (lpe->ex.X_op == O_big) {
+ if (lpe->ex.X_add_number <= 0)
+ generic_floating_point_number = lpe->floatnum;
+ else
+ memcpy(generic_bignum, lpe->bignum,
+ lpe->ex.X_add_number*sizeof(LITTLENUM_TYPE));
+ }
+ emit_expr (&lpe->ex, lpe->nbytes);
+ }
+
+ lpe->next = lpe_free_list;
+ lpe_free_list = lpe;
+ }
+ lpe_list_tail = NULL;
+ lp_sym = NULL;
+ lp_count++;
+ lpe_count = 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. */
+
+char *
+md_atof (type, litp, sizep)
+ int type;
+ char *litp;
+ int *sizep;
+{
+ int prec;
+ LITTLENUM_TYPE words[4];
+ char *t;
+ int i;
+
+ switch (type)
+ {
+ case 'f':
+ prec = 2;
+ break;
+
+ case 'd':
+ prec = 4;
+ break;
+
+ default:
+ *sizep = 0;
+ return "bad call to md_atof";
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+
+ *sizep = prec * 2;
+
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litp, (valueT) words[i], 2);
+ litp += 2;
+ }
+
+ return NULL;
+}
+
+/* Align a section (I don't know why this is machine dependent). */
+
+valueT
+md_section_align (seg, addr)
+ asection *seg;
+ valueT addr;
+{
+ int align = bfd_get_section_alignment (stdoutput, seg);
+
+ return ((addr + (1 << align) - 1) & (-1 << align));
+}
+
+/* We don't have any form of relaxing. */
+
+int
+md_estimate_size_before_relax (fragp, seg)
+ fragS *fragp ATTRIBUTE_UNUSED;
+ asection *seg ATTRIBUTE_UNUSED;
+{
+ abort ();
+ return 0;
+}
+
+/* Convert a machine dependent frag. We never generate these. */
+
+void
+md_convert_frag (abfd, sec, fragp)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec ATTRIBUTE_UNUSED;
+ fragS *fragp ATTRIBUTE_UNUSED;
+{
+ abort ();
+}
+
+symbolS *
+md_undefined_symbol (name)
+ char *name;
+{
+ if (*name == '_' && *(name+1) == 'G'
+ && strcmp(name, "_GLOBAL_OFFSET_TABLE_") == 0)
+ {
+ if(!GOT_symbol)
+ {
+ if(symbol_find(name))
+ as_bad(_("GOT already in symbol table"));
+ GOT_symbol = symbol_new (name, undefined_section,
+ (valueT) 0, &zero_address_frag);
+ }
+ return GOT_symbol;
+ }
+ return 0;
+}
+
+/* Functions concerning relocs. */
+
+/* The location from which a PC relative jump should be calculated,
+ given a PC relative reloc. */
+
+long
+md_pcrel_from_section (fixp, sec)
+ fixS *fixp;
+ segT sec ATTRIBUTE_UNUSED;
+{
+ return fixp->fx_frag->fr_address + fixp->fx_where;
+}
+
+/* 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_s390_fix_adjustable(fixP)
+ fixS * fixP;
+{
+ /* Prevent all adjustments to global symbols. */
+ if (S_IS_EXTERN (fixP->fx_addsy))
+ return 0;
+ if (S_IS_WEAK (fixP->fx_addsy))
+ return 0;
+ /* adjust_reloc_syms doesn't know about the GOT. */
+ if (fixP->fx_r_type == BFD_RELOC_32_GOTOFF
+ || fixP->fx_r_type == BFD_RELOC_390_PLT16DBL
+ || fixP->fx_r_type == BFD_RELOC_390_PLT32
+ || fixP->fx_r_type == BFD_RELOC_390_PLT32DBL
+ || fixP->fx_r_type == BFD_RELOC_390_PLT64
+ || fixP->fx_r_type == BFD_RELOC_390_GOT12
+ || fixP->fx_r_type == BFD_RELOC_390_GOT16
+ || fixP->fx_r_type == BFD_RELOC_32_GOT_PCREL
+ || fixP->fx_r_type == BFD_RELOC_390_GOT64
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 0;
+ return 1;
+}
+
+/* Apply a fixup to the object code. This is called for all the
+ fixups we generated by the call to fix_new_exp, above. In the call
+ above we used a reloc code which was the largest legal reloc code
+ plus the operand index. Here we undo that to recover the operand
+ index. At this point all symbol values should be fully resolved,
+ and we attempt to completely resolve the reloc. If we can not do
+ that, we determine the correct reloc code and put it back in the
+ fixup. */
+
+int
+md_apply_fix3 (fixp, valuep, seg)
+ fixS *fixp;
+ valueT *valuep;
+ segT seg ATTRIBUTE_UNUSED;
+{
+ char *where;
+ valueT value;
+
+ value = *valuep;
+ where = fixp->fx_frag->fr_literal + fixp->fx_where;
+
+ if (fixp->fx_subsy != NULL) {
+ if (!S_IS_DEFINED (fixp->fx_subsy))
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("unresolved fx_subsy symbol that must be resolved"));
+ value -= S_GET_VALUE(fixp->fx_subsy);
+ }
+
+ if (fixp->fx_addsy != NULL) {
+ /* `*valuep' may contain the value of the symbol on which the reloc
+ will be based; we have to remove it. */
+ if (fixp->fx_addsy->sy_used_in_reloc
+ && S_GET_SEGMENT (fixp->fx_addsy) != absolute_section
+ && S_GET_SEGMENT (fixp->fx_addsy) != undefined_section
+ && ! bfd_is_com_section (S_GET_SEGMENT (fixp->fx_addsy)))
+ value -= S_GET_VALUE (fixp->fx_addsy);
+
+ if (fixp->fx_pcrel)
+ value += fixp->fx_frag->fr_address + fixp->fx_where;
+ } else {
+ fixp->fx_done = 1;
+ }
+
+ if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) {
+ const struct s390_operand *operand;
+ int opindex;
+
+ opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED;
+ operand = &s390_operands[opindex];
+
+ if (fixp->fx_done) {
+ /* Insert the fully resolved operand value. */
+ s390_insert_operand (where, operand, (offsetT) value,
+ fixp->fx_file, fixp->fx_line);
+ return 1;
+ }
+
+ /* Determine a BFD reloc value based on the operand information.
+ We are only prepared to turn a few of the operands into
+ relocs. */
+ fixp->fx_offset = value;
+ if (operand->bits == 12 && operand->shift == 20) {
+ fixp->fx_size = 2;
+ fixp->fx_where += 2;
+ fixp->fx_r_type = BFD_RELOC_390_12;
+ } else if (operand->bits == 12 && operand->shift == 36) {
+ fixp->fx_size = 2;
+ fixp->fx_where += 4;
+ fixp->fx_r_type = BFD_RELOC_390_12;
+ } else if (operand->bits == 8 && operand->shift == 8) {
+ fixp->fx_size = 1;
+ fixp->fx_where += 1;
+ fixp->fx_r_type = BFD_RELOC_8;
+ } else if (operand->bits == 16 && operand->shift == 16) {
+ fixp->fx_size = 2;
+ fixp->fx_where += 2;
+ if (operand->flags & S390_OPERAND_PCREL) {
+ fixp->fx_r_type = BFD_RELOC_390_PC16DBL;
+ fixp->fx_offset += 2;
+ } else
+ fixp->fx_r_type = BFD_RELOC_16;
+ } else if (operand->bits == 32 && operand->shift == 16 &&
+ (operand->flags & S390_OPERAND_PCREL)) {
+ fixp->fx_size = 4;
+ fixp->fx_where += 2;
+ fixp->fx_offset += 2;
+ fixp->fx_r_type = BFD_RELOC_390_PC32DBL;
+ } else {
+ char *sfile;
+ unsigned int sline;
+
+ /* Use expr_symbol_where to see if this is an expression
+ symbol. */
+ if (expr_symbol_where (fixp->fx_addsy, &sfile, &sline))
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("unresolved expression that must be resolved"));
+ else
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("unsupported relocation type"));
+ fixp->fx_done = 1;
+ return 1;
+ }
+ } else {
+ switch (fixp->fx_r_type) {
+ case BFD_RELOC_8:
+ if (fixp->fx_pcrel)
+ abort ();
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 1);
+ break;
+ case BFD_RELOC_390_12:
+ case BFD_RELOC_390_GOT12:
+ if (fixp->fx_done) {
+ unsigned short mop;
+ mop = bfd_getb16 ((unsigned char *) where);
+ mop |= (unsigned short) (value & 0xfff);
+ bfd_putb16 ((bfd_vma) mop, (unsigned char *) where);
+ }
+ break;
+
+ case BFD_RELOC_16:
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_16_GOT_PCREL:
+ case BFD_RELOC_16_GOTOFF:
+ if (fixp->fx_pcrel)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ "cannot emit PC relative %s relocation%s%s",
+ bfd_get_reloc_code_name (fixp->fx_r_type),
+ fixp->fx_addsy != NULL ? " against " : "",
+ (fixp->fx_addsy != NULL
+ ? S_GET_NAME (fixp->fx_addsy)
+ : ""));
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 2);
+ break;
+ case BFD_RELOC_390_GOT16:
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 2);
+ break;
+ case BFD_RELOC_390_PC16DBL:
+ case BFD_RELOC_390_PLT16DBL:
+ value += 2;
+ if (fixp->fx_done)
+ md_number_to_chars (where, (offsetT) value >> 1, 2);
+ break;
+
+ case BFD_RELOC_32:
+ if (fixp->fx_pcrel)
+ fixp->fx_r_type = BFD_RELOC_32_PCREL;
+ else
+ fixp->fx_r_type = BFD_RELOC_32;
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 4);
+ break;
+ case BFD_RELOC_32_PCREL:
+ case BFD_RELOC_32_BASEREL:
+ fixp->fx_r_type = BFD_RELOC_32_PCREL;
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 4);
+ break;
+ case BFD_RELOC_32_GOT_PCREL:
+ case BFD_RELOC_390_PLT32:
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 4);
+ break;
+ case BFD_RELOC_390_PC32DBL:
+ case BFD_RELOC_390_PLT32DBL:
+ case BFD_RELOC_390_GOTPCDBL:
+ case BFD_RELOC_390_GOTENT:
+ value += 2;
+ if (fixp->fx_done)
+ md_number_to_chars (where, (offsetT) value >> 1, 4);
+ break;
+
+ case BFD_RELOC_32_GOTOFF:
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, sizeof(int));
+ break;
+
+ case BFD_RELOC_390_GOT64:
+ case BFD_RELOC_390_PLT64:
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 8);
+ break;
+
+ case BFD_RELOC_64:
+ if (fixp->fx_pcrel)
+ fixp->fx_r_type = BFD_RELOC_64_PCREL;
+ else
+ fixp->fx_r_type = BFD_RELOC_64;
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 8);
+ break;
+
+ case BFD_RELOC_64_PCREL:
+ fixp->fx_r_type = BFD_RELOC_64_PCREL;
+ if (fixp->fx_done)
+ md_number_to_chars (where, value, 8);
+ break;
+
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_VTABLE_ENTRY:
+ fixp->fx_done = 0;
+ return 1;
+
+ default: {
+ const char *reloc_name = bfd_get_reloc_code_name(fixp->fx_r_type);
+ if (reloc_name != NULL)
+ fprintf(stderr, "Gas failure, reloc type %s\n", reloc_name);
+ else
+ fprintf(stderr, "Gas failure, reloc type #%i\n", fixp->fx_r_type);
+ fflush(stderr);
+ abort ();
+ }
+ }
+
+ fixp->fx_offset = value;
+ }
+
+ return 1;
+}
+
+/* Generate a reloc for a fixup. */
+
+arelent *
+tc_gen_reloc (seg, fixp)
+ asection *seg ATTRIBUTE_UNUSED;
+ fixS *fixp;
+{
+ bfd_reloc_code_real_type code;
+ arelent *reloc;
+
+ code = fixp->fx_r_type;
+ if (GOT_symbol && fixp->fx_addsy == GOT_symbol) {
+ if ((s390_arch_size == 32 && code == BFD_RELOC_32_PCREL) ||
+ (s390_arch_size == 64 && code == BFD_RELOC_64_PCREL))
+ code = BFD_RELOC_390_GOTPC;
+ if (code == BFD_RELOC_390_PC32DBL)
+ code = BFD_RELOC_390_GOTPCDBL;
+ }
+
+ reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
+ if (reloc->howto == NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot represent relocation type %s"),
+ bfd_get_reloc_code_name (code));
+ /* Set howto to a garbage value so that we can keep going. */
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
+ assert (reloc->howto != NULL);
+ }
+ reloc->addend = fixp->fx_offset;
+
+ return reloc;
+}
+
diff --git a/gas/config/tc-s390.h b/gas/config/tc-s390.h
new file mode 100644
index 0000000..954fa18
--- /dev/null
+++ b/gas/config/tc-s390.h
@@ -0,0 +1,113 @@
+/* tc-s390.h -- Header file for tc-s390.c.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ Written by Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#define TC_S390
+
+#ifdef ANSI_PROTOTYPES
+struct fix;
+#endif
+
+#ifndef BFD_ASSEMBLER
+ #error S390 support requires BFD_ASSEMBLER
+#endif
+
+/* This expression evaluates to false if the relocation is for a local object
+ for which we still want to do the relocation at runtime. True if we
+ are willing to perform this relocation while building the .o file.
+ This is only used for pcrel relocations, so GOTOFF does not need to be
+ checked here. I am not sure if some of the others are ever used with
+ pcrel, but it is easier to be safe than sorry. */
+
+#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
+ ((FIX)->fx_addsy == NULL \
+ || (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
+ && ! S_IS_WEAK ((FIX)->fx_addsy) \
+ && S_IS_DEFINED ((FIX)->fx_addsy) \
+ && ! S_IS_COMMON ((FIX)->fx_addsy)))
+
+#define tc_fix_adjustable(X) tc_s390_fix_adjustable(X)
+extern int tc_s390_fix_adjustable PARAMS ((struct fix *));
+
+/* The target BFD architecture. */
+#define TARGET_ARCH bfd_arch_s390
+extern enum bfd_architecture s390_arch PARAMS ((void));
+
+/* The target BFD format. */
+#define TARGET_FORMAT s390_target_format()
+
+/* Set the endianness we are using. */
+#define TARGET_BYTES_BIG_ENDIAN 1
+
+/* Whether or not the target is big endian */
+extern int target_big_endian;
+
+/* Permit temporary numeric labels. */
+#define LOCAL_LABELS_FB 1
+
+/* $ is used to refer to the current location. */
+/* #define DOLLAR_DOT */
+
+/* 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).
+ */
+#define UNDEFINED_DIFFERENCE_OK
+
+/* foo-. gets turned into PC relative relocs */
+#define DIFF_EXPR_OK
+
+/* We don't need to handle .word strangely. */
+#define WORKING_DOT_WORD
+
+/* We set the fx_done field appropriately in md_apply_fix. */
+#define TC_HANDLES_FX_DONE
+
+#define md_number_to_chars number_to_chars_bigendian
+
+#define md_do_align(n, fill, len, max, around) \
+if ((n) && !need_pass_2 && (fill == 0) && \
+ (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) { \
+ char *p; \
+ p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \
+ (symbolS *) 0, (offsetT) (n), (char *) 0); \
+ *p = 0x07; \
+ goto around; \
+}
+
+extern void s390_align_code PARAMS ((fragS *, int));
+
+#define HANDLE_ALIGN(fragP) \
+if (fragP->fr_type == rs_align_code) \
+ s390_align_code (fragP, (fragP->fr_next->fr_address \
+ - fragP->fr_address \
+ - fragP->fr_fix));
+
+/* call md_apply_fix3 with segment instead of md_apply_fix */
+#define MD_APPLY_FIX3
+
+/* call md_pcrel_from_section, not md_pcrel_from */
+#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
+extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
+
+#define md_operand(x)
+
+extern void s390_md_end PARAMS ((void));
+#define md_end() s390_md_end ()
diff --git a/gas/configure b/gas/configure
index a0f4dfe..ad4fdf8 100755
--- a/gas/configure
+++ b/gas/configure
@@ -2279,6 +2279,8 @@ for this_target in $target $canon_targets ; do
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
+ s390x*) cpu_type=s390 arch=s390x ;;
+ s390*) cpu_type=s390 arch=s390 ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
@@ -2524,6 +2526,9 @@ EOF
ppc-*-netware*) fmt=elf em=ppcnw ;;
ppc-*-vxworks*) fmt=elf ;;
+ s390x-*-linux-gnu*) fmt=elf em=linux ;;
+ s390-*-linux-gnu*) fmt=elf em=linux ;;
+
sh-*-linux*) fmt=elf em=linux ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
@@ -2672,6 +2677,15 @@ EOF
esac
;;
+ s390)
+ if test $this_target = $target ; then
+ cat >> confdefs.h <<EOF
+#define DEFAULT_ARCH "${arch}"
+EOF
+
+ fi
+ ;;
+
mips)
echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
@@ -3080,7 +3094,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:3084: checking for $ac_word" >&5
+echo "configure:3098: 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
@@ -3110,7 +3124,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:3114: checking for $ac_word" >&5
+echo "configure:3128: 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
@@ -3161,7 +3175,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:3165: checking for $ac_word" >&5
+echo "configure:3179: 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
@@ -3193,7 +3207,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:3197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:3211: 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.
@@ -3204,12 +3218,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 3208 "configure"
+#line 3222 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3227: \"$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
@@ -3235,12 +3249,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:3239: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:3253: 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:3244: checking whether we are using GNU C" >&5
+echo "configure:3258: 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
@@ -3249,7 +3263,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3253: \"$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:3267: \"$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
@@ -3268,7 +3282,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:3272: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:3286: 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
@@ -3305,7 +3319,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:3309: checking for $ac_word" >&5
+echo "configure:3323: 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
@@ -3336,7 +3350,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:3340: checking how to run the C preprocessor" >&5
+echo "configure:3354: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -3351,13 +3365,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 3355 "configure"
+#line 3369 "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:3361: \"$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
:
@@ -3368,13 +3382,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 3372 "configure"
+#line 3386 "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:3378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3392: \"$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
:
@@ -3385,13 +3399,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 3389 "configure"
+#line 3403 "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:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3409: \"$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
:
@@ -3421,7 +3435,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:3425: checking for $ac_word" >&5
+echo "configure:3439: 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
@@ -3454,7 +3468,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:3458: checking for $ac_word" >&5
+echo "configure:3472: 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
@@ -3488,7 +3502,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:3492: checking for yywrap in -l$ac_lib" >&5
+echo "configure:3506: 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
@@ -3496,7 +3510,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3500 "configure"
+#line 3514 "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
@@ -3507,7 +3521,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3525: \"$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
@@ -3530,7 +3544,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:3534: checking lex output file root" >&5
+echo "configure:3548: 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
@@ -3551,7 +3565,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:3555: checking whether yytext is a pointer" >&5
+echo "configure:3569: 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
@@ -3563,14 +3577,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 3567 "configure"
+#line 3581 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3588: \"$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
@@ -3596,7 +3610,7 @@ 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:3600: checking for $ac_word" >&5
+echo "configure:3614: 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
@@ -3624,12 +3638,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3628: checking for ANSI C header files" >&5
+echo "configure:3642: 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 3633 "configure"
+#line 3647 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3637,7 +3651,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3655: \"$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*
@@ -3654,7 +3668,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 3658 "configure"
+#line 3672 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3672,7 +3686,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 3676 "configure"
+#line 3690 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3693,7 +3707,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 3697 "configure"
+#line 3711 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3704,7 +3718,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -3728,12 +3742,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3732: checking for working const" >&5
+echo "configure:3746: 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 3737 "configure"
+#line 3751 "configure"
#include "confdefs.h"
int main() {
@@ -3782,7 +3796,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3803,21 +3817,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3807: checking for inline" >&5
+echo "configure:3821: 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 3814 "configure"
+#line 3828 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3843,12 +3857,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3847: checking for off_t" >&5
+echo "configure:3861: 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 3852 "configure"
+#line 3866 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3876,12 +3890,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3880: checking for size_t" >&5
+echo "configure:3894: 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 3885 "configure"
+#line 3899 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3911,19 +3925,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:3915: checking for working alloca.h" >&5
+echo "configure:3929: 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 3920 "configure"
+#line 3934 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3941: \"$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
@@ -3944,12 +3958,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3948: checking for alloca" >&5
+echo "configure:3962: 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 3953 "configure"
+#line 3967 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3977,7 +3991,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3995: \"$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
@@ -4009,12 +4023,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4013: checking whether alloca needs Cray hooks" >&5
+echo "configure:4027: 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 4018 "configure"
+#line 4032 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4039,12 +4053,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:4043: checking for $ac_func" >&5
+echo "configure:4057: 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 4048 "configure"
+#line 4062 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4067,7 +4081,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4085: \"$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
@@ -4094,7 +4108,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4098: checking stack direction for C alloca" >&5
+echo "configure:4112: 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
@@ -4102,7 +4116,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4106 "configure"
+#line 4120 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -4121,7 +4135,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4139: \"$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
@@ -4146,17 +4160,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:4150: checking for $ac_hdr" >&5
+echo "configure:4164: 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 4155 "configure"
+#line 4169 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4174: \"$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*
@@ -4185,12 +4199,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4189: checking for $ac_func" >&5
+echo "configure:4203: 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 4194 "configure"
+#line 4208 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4213,7 +4227,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4231: \"$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
@@ -4238,7 +4252,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:4242: checking for working mmap" >&5
+echo "configure:4256: 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
@@ -4246,7 +4260,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 4250 "configure"
+#line 4264 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -4386,7 +4400,7 @@ main()
}
EOF
-if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4404: \"$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
@@ -4414,17 +4428,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:4418: checking for $ac_hdr" >&5
+echo "configure:4432: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4423 "configure"
+#line 4437 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4454,12 +4468,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4458: checking for $ac_func" >&5
+echo "configure:4472: 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 4463 "configure"
+#line 4477 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4482,7 +4496,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4500: \"$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
@@ -4511,12 +4525,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4515: checking for $ac_func" >&5
+echo "configure:4529: 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 4520 "configure"
+#line 4534 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4539,7 +4553,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4557: \"$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
@@ -4573,19 +4587,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:4577: checking for LC_MESSAGES" >&5
+echo "configure:4591: 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 4582 "configure"
+#line 4596 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4603: \"$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
@@ -4606,7 +4620,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:4610: checking whether NLS is requested" >&5
+echo "configure:4624: 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"
@@ -4626,7 +4640,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:4630: checking whether included gettext is requested" >&5
+echo "configure:4644: 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"
@@ -4645,17 +4659,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:4649: checking for libintl.h" >&5
+echo "configure:4663: 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 4654 "configure"
+#line 4668 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4673: \"$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*
@@ -4672,19 +4686,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:4676: checking for gettext in libc" >&5
+echo "configure:4690: 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 4681 "configure"
+#line 4695 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:4688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -4700,7 +4714,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:4704: checking for bindtextdomain in -lintl" >&5
+echo "configure:4718: 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
@@ -4708,7 +4722,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4712 "configure"
+#line 4726 "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
@@ -4719,7 +4733,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4737: \"$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
@@ -4735,19 +4749,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:4739: checking for gettext in libintl" >&5
+echo "configure:4753: 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 4744 "configure"
+#line 4758 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:4751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4765: \"$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
@@ -4775,7 +4789,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:4779: checking for $ac_word" >&5
+echo "configure:4793: 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
@@ -4809,12 +4823,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4813: checking for $ac_func" >&5
+echo "configure:4827: 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 4818 "configure"
+#line 4832 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4837,7 +4851,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4855: \"$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
@@ -4864,7 +4878,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:4868: checking for $ac_word" >&5
+echo "configure:4882: 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
@@ -4900,7 +4914,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:4904: checking for $ac_word" >&5
+echo "configure:4918: 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
@@ -4932,7 +4946,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4936 "configure"
+#line 4950 "configure"
#include "confdefs.h"
int main() {
@@ -4940,7 +4954,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4944: \"$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*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4972,7 +4986,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:4976: checking for $ac_word" >&5
+echo "configure:4990: 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
@@ -5006,7 +5020,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:5010: checking for $ac_word" >&5
+echo "configure:5024: 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
@@ -5042,7 +5056,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:5046: checking for $ac_word" >&5
+echo "configure:5060: 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
@@ -5132,7 +5146,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:5136: checking for catalogs to be installed" >&5
+echo "configure:5150: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -5160,17 +5174,17 @@ echo "configure:5136: 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:5164: checking for linux/version.h" >&5
+echo "configure:5178: 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 5169 "configure"
+#line 5183 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5188: \"$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*
@@ -5233,7 +5247,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:5237: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:5251: 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"
@@ -5258,7 +5272,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:5262: checking for executable suffix" >&5
+echo "configure:5276: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5268,7 +5282,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:5286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -5293,17 +5307,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:5297: checking for $ac_hdr" >&5
+echo "configure:5311: 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 5302 "configure"
+#line 5316 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5321: \"$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*
@@ -5333,7 +5347,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:5337: checking whether compiling a cross-assembler" >&5
+echo "configure:5351: checking whether compiling a cross-assembler" >&5
if test "${host}" = "${target}"; then
cross_gas=no
else
@@ -5348,19 +5362,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:5352: checking for working alloca.h" >&5
+echo "configure:5366: 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 5357 "configure"
+#line 5371 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5378: \"$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
@@ -5381,12 +5395,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5385: checking for alloca" >&5
+echo "configure:5399: 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 5390 "configure"
+#line 5404 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -5414,7 +5428,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5432: \"$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
@@ -5446,12 +5460,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5450: checking whether alloca needs Cray hooks" >&5
+echo "configure:5464: 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 5455 "configure"
+#line 5469 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5476,12 +5490,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:5480: checking for $ac_func" >&5
+echo "configure:5494: 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 5485 "configure"
+#line 5499 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5504,7 +5518,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5522: \"$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
@@ -5531,7 +5545,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5535: checking stack direction for C alloca" >&5
+echo "configure:5549: 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
@@ -5539,7 +5553,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 5543 "configure"
+#line 5557 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -5558,7 +5572,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:5562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5576: \"$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
@@ -5580,21 +5594,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:5584: checking for inline" >&5
+echo "configure:5598: 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 5591 "configure"
+#line 5605 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:5598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -5624,12 +5638,12 @@ esac
for ac_func in unlink remove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5628: checking for $ac_func" >&5
+echo "configure:5642: 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 5633 "configure"
+#line 5647 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5652,7 +5666,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5670: \"$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
@@ -5681,12 +5695,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5685: checking for $ac_func" >&5
+echo "configure:5699: 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 5690 "configure"
+#line 5704 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5709,7 +5723,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5727: \"$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
@@ -5744,7 +5758,7 @@ case "$host" in
;;
*-ncr-sysv4.3*)
echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6
-echo "configure:5748: checking for _mwvalidcheckl in -lmw" >&5
+echo "configure:5762: 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
@@ -5752,7 +5766,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmw $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5756 "configure"
+#line 5770 "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
@@ -5763,7 +5777,7 @@ int main() {
_mwvalidcheckl()
; return 0; }
EOF
-if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5781: \"$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
@@ -5784,7 +5798,7 @@ else
fi
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5788: checking for main in -lm" >&5
+echo "configure:5802: 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
@@ -5792,14 +5806,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5796 "configure"
+#line 5810 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5817: \"$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
@@ -5822,7 +5836,7 @@ fi
;;
*)
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:5826: checking for main in -lm" >&5
+echo "configure:5840: 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
@@ -5830,14 +5844,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5834 "configure"
+#line 5848 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:5841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5855: \"$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
@@ -5868,12 +5882,12 @@ esac
# 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:5872: checking for working assert macro" >&5
+echo "configure:5886: 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 5877 "configure"
+#line 5891 "configure"
#include "confdefs.h"
#include <assert.h>
#include <stdio.h>
@@ -5889,7 +5903,7 @@ assert (a == b
; return 0; }
EOF
-if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gas_cv_assert_ok=yes
else
@@ -5930,12 +5944,12 @@ gas_test_headers="
"
echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6
-echo "configure:5934: checking whether declaration is required for strstr" >&5
+echo "configure:5948: 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 5939 "configure"
+#line 5953 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5946,7 +5960,7 @@ x = (f) strstr;
; return 0; }
EOF
-if { (eval echo configure:5950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5964: \"$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
@@ -5967,12 +5981,12 @@ fi
echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6
-echo "configure:5971: checking whether declaration is required for malloc" >&5
+echo "configure:5985: 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 5976 "configure"
+#line 5990 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -5983,7 +5997,7 @@ x = (f) malloc;
; return 0; }
EOF
-if { (eval echo configure:5987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6001: \"$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
@@ -6004,12 +6018,12 @@ fi
echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6
-echo "configure:6008: checking whether declaration is required for free" >&5
+echo "configure:6022: 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 6013 "configure"
+#line 6027 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -6020,7 +6034,7 @@ x = (f) free;
; return 0; }
EOF
-if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6038: \"$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
@@ -6041,12 +6055,12 @@ fi
echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6
-echo "configure:6045: checking whether declaration is required for sbrk" >&5
+echo "configure:6059: 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 6050 "configure"
+#line 6064 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -6057,7 +6071,7 @@ x = (f) sbrk;
; return 0; }
EOF
-if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6075: \"$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
@@ -6078,12 +6092,12 @@ fi
echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6
-echo "configure:6082: checking whether declaration is required for environ" >&5
+echo "configure:6096: 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 6087 "configure"
+#line 6101 "configure"
#include "confdefs.h"
$gas_test_headers
int main() {
@@ -6094,7 +6108,7 @@ x = (f) environ;
; return 0; }
EOF
-if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6112: \"$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
@@ -6118,12 +6132,12 @@ fi
# for it?
echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6
-echo "configure:6122: checking whether declaration is required for errno" >&5
+echo "configure:6136: 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 6127 "configure"
+#line 6141 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
@@ -6138,7 +6152,7 @@ x = (f) errno;
; return 0; }
EOF
-if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6156: \"$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
diff --git a/gas/configure.in b/gas/configure.in
index ad46b8f..c89a2df 100644
--- a/gas/configure.in
+++ b/gas/configure.in
@@ -139,6 +139,8 @@ changequote([,])dnl
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
+ s390x*) cpu_type=s390 arch=s390x ;;
+ s390*) cpu_type=s390 arch=s390 ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
@@ -377,6 +379,9 @@ changequote([,])dnl
ppc-*-netware*) fmt=elf em=ppcnw ;;
ppc-*-vxworks*) fmt=elf ;;
+ s390x-*-linux-gnu*) fmt=elf em=linux ;;
+ s390-*-linux-gnu*) fmt=elf em=linux ;;
+
sh-*-linux*) fmt=elf em=linux ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
@@ -523,6 +528,12 @@ changequote([,])dnl
esac
;;
+ s390)
+ if test $this_target = $target ; then
+ AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.])
+ fi
+ ;;
+
mips)
echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
diff --git a/gas/po/POTFILES.in b/gas/po/POTFILES.in
index 30dab30..d3d8df9 100644
--- a/gas/po/POTFILES.in
+++ b/gas/po/POTFILES.in
@@ -96,6 +96,8 @@ config/tc-pj.c
config/tc-pj.h
config/tc-ppc.c
config/tc-ppc.h
+config/tc-s390.c
+config/tc-s390.h
config/tc-sh.c
config/tc-sh.h
config/tc-sparc.c
diff --git a/gas/po/gas.pot b/gas/po/gas.pot
index 4428b64..47a8e96 100644
--- a/gas/po/gas.pot
+++ b/gas/po/gas.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-11 12:04-0800\n"
+"POT-Creation-Date: 2001-02-09 16:34-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -264,7 +264,7 @@ msgid "GNU assembler %s\n"
msgstr ""
#: as.c:528
-msgid "Copyright 2000 Free Software Foundation, Inc.\n"
+msgid "Copyright 2001 Free Software Foundation, Inc.\n"
msgstr ""
#: as.c:529 gasp.c:3621
@@ -354,7 +354,7 @@ msgstr ""
#. * This should never happen.
#.
#: atof-generic.c:437 config/tc-a29k.c:544 config/tc-i860.c:340
-#: config/tc-i860.c:832 config/tc-m68k.c:3176 config/tc-m68k.c:3205
+#: config/tc-i860.c:832 config/tc-m68k.c:3186 config/tc-m68k.c:3215
#: config/tc-sparc.c:2543
msgid "failed sanity check."
msgstr ""
@@ -627,7 +627,7 @@ msgstr ""
msgid "Symbol %s already defined"
msgstr ""
-#: config/obj-coff.c:4176 config/tc-i960.c:3215
+#: config/obj-coff.c:4176 config/tc-i960.c:3214
#, c-format
msgid "No 'bal' entry point for leafproc %s"
msgstr ""
@@ -649,7 +649,7 @@ msgstr ""
#. This is a COBR instruction. They have only a 13-bit
#. displacement and are only to be used for local branches:
#. flag as error, don't generate relocation.
-#: config/obj-coff.c:4411 config/tc-i960.c:3235 write.c:2733
+#: config/obj-coff.c:4411 config/tc-i960.c:3234 write.c:2733
msgid "can't use COBR format with external label"
msgstr ""
@@ -680,7 +680,7 @@ msgstr ""
msgid ".COMMon length (%d.) <0! Ignored."
msgstr ""
-#: config/obj-elf.c:325 config/tc-alpha.c:4335 config/tc-sparc.c:3694
+#: config/obj-elf.c:325 config/tc-alpha.c:4331 config/tc-sparc.c:3694
#: config/tc-v850.c:282
msgid "Ignoring attempt to re-define symbol"
msgstr ""
@@ -694,7 +694,7 @@ msgstr ""
msgid "Common alignment negative; 0 assumed"
msgstr ""
-#: config/obj-elf.c:375 config/tc-m32r.c:1286 config/tc-ppc.c:1518
+#: config/obj-elf.c:375 config/tc-m32r.c:1287 config/tc-ppc.c:1518
#: config/tc-v850.c:382
msgid "Common alignment not a power of 2"
msgstr ""
@@ -977,7 +977,7 @@ msgid "Unknown segment type"
msgstr ""
#. Probably a memory allocation problem? Give up now.
-#: config/tc-a29k.c:330 config/tc-hppa.c:1412 config/tc-mips.c:1030
+#: config/tc-a29k.c:330 config/tc-hppa.c:1437 config/tc-mips.c:1030
#: config/tc-mips.c:1072 config/tc-sparc.c:846
msgid "Broken assembler. No assembly attempted."
msgstr ""
@@ -985,13 +985,14 @@ msgstr ""
#: config/tc-a29k.c:375 config/tc-avr.c:1124 config/tc-d10v.c:532
#: config/tc-d30v.c:552 config/tc-h8300.c:296 config/tc-h8500.c:294
#: config/tc-mcore.c:655 config/tc-mn10200.c:954 config/tc-mn10300.c:1335
-#: config/tc-ppc.c:1974 config/tc-sh.c:838 config/tc-tic80.c:282
-#: config/tc-v850.c:2076 config/tc-w65.c:248 config/tc-z8k.c:336
+#: config/tc-ppc.c:1974 config/tc-s390.c:964 config/tc-sh.c:843
+#: config/tc-tic80.c:282 config/tc-v850.c:2076 config/tc-w65.c:248
+#: config/tc-z8k.c:336
msgid "missing operand"
msgstr ""
#: config/tc-a29k.c:415 config/tc-cris.c:913 config/tc-cris.c:921
-#: config/tc-hppa.c:1545 config/tc-i860.c:431 config/tc-i860.c:448
+#: config/tc-hppa.c:1572 config/tc-i860.c:431 config/tc-i860.c:448
#: config/tc-sparc.c:1408 config/tc-sparc.c:1414
#, c-format
msgid "Unknown opcode: `%s'"
@@ -1043,33 +1044,33 @@ msgstr ""
msgid "Invalid register in & expression"
msgstr ""
-#: config/tc-alpha.c:837
+#: config/tc-alpha.c:827
#, c-format
msgid "internal error: can't hash opcode `%s': %s"
msgstr ""
-#: config/tc-alpha.c:871
+#: config/tc-alpha.c:861
#, c-format
msgid "internal error: can't hash macro `%s': %s"
msgstr ""
-#: config/tc-alpha.c:954 config/tc-i960.c:2700
+#: config/tc-alpha.c:945 config/tc-i960.c:2700
msgid "syntax error"
msgstr ""
-#: config/tc-alpha.c:1028 config/tc-arm.c:6629 config/tc-h8300.c:1373
-#: config/tc-h8500.c:1197 config/tc-hppa.c:3939 config/tc-i860.c:931
-#: config/tc-m68hc11.c:478 config/tc-m68k.c:4179 config/tc-m88k.c:1105
+#: config/tc-alpha.c:1019 config/tc-arm.c:6629 config/tc-h8300.c:1373
+#: config/tc-h8500.c:1197 config/tc-hppa.c:3990 config/tc-i860.c:931
+#: config/tc-m68hc11.c:481 config/tc-m68k.c:4189 config/tc-m88k.c:1105
#: config/tc-ns32k.c:1663 config/tc-sparc.c:2830 config/tc-z8k.c:1324
msgid "Bad call to MD_ATOF()"
msgstr ""
-#: config/tc-alpha.c:1078
+#: config/tc-alpha.c:1069
#, c-format
msgid "Unknown CPU identifier `%s'"
msgstr ""
-#: config/tc-alpha.c:1122
+#: config/tc-alpha.c:1113
msgid ""
"Alpha options:\n"
"-32addr\t\t\ttreat addresses as 32-bit values\n"
@@ -1080,293 +1081,294 @@ msgid ""
"\t\t\tthese variants include PALcode opcodes\n"
msgstr ""
-#: config/tc-alpha.c:1132
+#: config/tc-alpha.c:1123
msgid ""
"VMS options:\n"
"-+\t\t\thash encode (don't truncate) names longer than 64 characters\n"
"-H\t\t\tshow new symbol after hash truncation\n"
msgstr ""
-#: config/tc-alpha.c:1305
+#: config/tc-alpha.c:1296
#, c-format
msgid "unhandled relocation type %s"
msgstr ""
-#: config/tc-alpha.c:1318
+#: config/tc-alpha.c:1309
msgid "non-absolute expression in constant field"
msgstr ""
-#: config/tc-alpha.c:1332
+#: config/tc-alpha.c:1323
#, c-format
msgid "type %d reloc done?\n"
msgstr ""
-#: config/tc-alpha.c:1383 config/tc-alpha.c:1390 config/tc-mips.c:7356
+#: config/tc-alpha.c:1374 config/tc-alpha.c:1381 config/tc-mips.c:7356
msgid "Used $at without \".set noat\""
msgstr ""
-#: config/tc-alpha.c:1572
+#: config/tc-alpha.c:1564
#, c-format
msgid "cannot represent `%s' relocation in object file"
msgstr ""
-#: config/tc-alpha.c:1579
+#: config/tc-alpha.c:1571
#, c-format
msgid "internal error? cannot generate `%s' relocation"
msgstr ""
-#: config/tc-alpha.c:1633
+#: config/tc-alpha.c:1625
#, c-format
msgid "frame reg expected, using $%d."
msgstr ""
-#: config/tc-alpha.c:1758
+#: config/tc-alpha.c:1752
#, c-format
msgid "No !literal!%d was found"
msgstr ""
#. only support one relocation op per insn
-#: config/tc-alpha.c:1946
+#: config/tc-alpha.c:1939
msgid "More than one relocation op per insn"
msgstr ""
-#: config/tc-alpha.c:1963
+#: config/tc-alpha.c:1956
msgid "No relocation operand"
msgstr ""
-#: config/tc-alpha.c:1969
+#: config/tc-alpha.c:1962
#, c-format
msgid "No !sequence-number after !%s"
msgstr ""
-#: config/tc-alpha.c:1982
+#: config/tc-alpha.c:1975
#, c-format
msgid "Unknown relocation operand: !%s"
msgstr ""
-#: config/tc-alpha.c:1995
+#: config/tc-alpha.c:1989
#, c-format
msgid "Bad sequence number: !%s!%s"
msgstr ""
-#: config/tc-alpha.c:2346
+#: config/tc-alpha.c:2341
#, c-format
msgid "operand out of range (%s not between %d and %d)"
msgstr ""
-#: config/tc-alpha.c:2445 config/tc-d10v.c:621 config/tc-d30v.c:640
+#: config/tc-alpha.c:2440 config/tc-d10v.c:621 config/tc-d30v.c:640
#: config/tc-mn10200.c:1009 config/tc-mn10300.c:1406 config/tc-ppc.c:1940
-#: config/tc-ppc.c:2048 config/tc-ppc.c:2060 config/tc-v850.c:1856
-#: config/tc-v850.c:1879 config/tc-v850.c:2099
+#: config/tc-ppc.c:2048 config/tc-ppc.c:2060 config/tc-s390.c:971
+#: config/tc-s390.c:1014 config/tc-v850.c:1856 config/tc-v850.c:1879
+#: config/tc-v850.c:2099
msgid "too many fixups"
msgstr ""
-#: config/tc-alpha.c:2660 config/tc-alpha.c:2729
+#: config/tc-alpha.c:2656 config/tc-alpha.c:2725
#, c-format
msgid "inappropriate arguments for opcode `%s'"
msgstr ""
-#: config/tc-alpha.c:2662 config/tc-alpha.c:2731
+#: config/tc-alpha.c:2658 config/tc-alpha.c:2727
#, c-format
msgid "opcode `%s' not supported for target %s"
msgstr ""
-#: config/tc-alpha.c:2666 config/tc-alpha.c:2734 config/tc-avr.c:1090
+#: config/tc-alpha.c:2662 config/tc-alpha.c:2730 config/tc-avr.c:1090
#, c-format
msgid "unknown opcode `%s'"
msgstr ""
-#: config/tc-alpha.c:2706 config/tc-alpha.c:2773 config/tc-alpha.c:3284
-#: config/tc-alpha.c:3344 config/tc-alpha.c:3396 config/tc-alpha.c:3471
-#: config/tc-alpha.c:3556 config/tc-alpha.c:3682 config/tc-alpha.c:3859
-#: config/tc-alpha.c:3916 config/tc-alpha.c:4026 config/tc-alpha.c:4133
-#: config/tc-alpha.c:4210
+#: config/tc-alpha.c:2702 config/tc-alpha.c:2768 config/tc-alpha.c:3280
+#: config/tc-alpha.c:3340 config/tc-alpha.c:3392 config/tc-alpha.c:3467
+#: config/tc-alpha.c:3552 config/tc-alpha.c:3678 config/tc-alpha.c:3855
+#: config/tc-alpha.c:3912 config/tc-alpha.c:4022 config/tc-alpha.c:4129
+#: config/tc-alpha.c:4206
#, c-format
msgid "Cannot use !%s!%d with %s"
msgstr ""
-#: config/tc-alpha.c:2794
+#: config/tc-alpha.c:2789
msgid "can not resolve expression"
msgstr ""
-#: config/tc-alpha.c:2936 config/tc-alpha.c:3128
+#: config/tc-alpha.c:2931 config/tc-alpha.c:3124
msgid "overflow in literal (.lita) table"
msgstr ""
-#: config/tc-alpha.c:2943 config/tc-alpha.c:2966 config/tc-alpha.c:3141
-#: config/tc-alpha.c:3485 config/tc-alpha.c:3563 config/tc-alpha.c:3611
-#: config/tc-alpha.c:3711 config/tc-alpha.c:3936 config/tc-alpha.c:4048
+#: config/tc-alpha.c:2938 config/tc-alpha.c:2961 config/tc-alpha.c:3137
+#: config/tc-alpha.c:3481 config/tc-alpha.c:3559 config/tc-alpha.c:3607
+#: config/tc-alpha.c:3707 config/tc-alpha.c:3932 config/tc-alpha.c:4044
msgid "macro requires $at register while noat in effect"
msgstr ""
-#: config/tc-alpha.c:2945 config/tc-alpha.c:2968 config/tc-alpha.c:3143
+#: config/tc-alpha.c:2940 config/tc-alpha.c:2963 config/tc-alpha.c:3139
msgid "macro requires $at while $at in use"
msgstr ""
-#: config/tc-alpha.c:3090 expr.c:83 read.c:3164
+#: config/tc-alpha.c:3086 expr.c:83 read.c:3164
msgid "bignum invalid; zero assumed"
msgstr ""
-#: config/tc-alpha.c:3092 expr.c:85 read.c:3166 read.c:3499 read.c:4397
+#: config/tc-alpha.c:3088 expr.c:85 read.c:3166 read.c:3499 read.c:4397
msgid "floating point number invalid; zero assumed"
msgstr ""
-#: config/tc-alpha.c:3097
+#: config/tc-alpha.c:3093
msgid "can't handle expression"
msgstr ""
-#: config/tc-alpha.c:3134
+#: config/tc-alpha.c:3130
msgid "overflow in literal (.lit8) table"
msgstr ""
-#: config/tc-alpha.c:3306
+#: config/tc-alpha.c:3302
#, c-format
msgid "bad instruction format for lda !%s!%ld"
msgstr ""
-#: config/tc-alpha.c:4306 config/tc-ppc.c:1467 config/tc-ppc.c:3689
+#: config/tc-alpha.c:4302 config/tc-ppc.c:1467 config/tc-ppc.c:3689
#: read.c:1369
#, c-format
msgid ".COMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-alpha.c:4344 config/tc-alpha.c:4353 config/tc-ppc.c:3726
+#: config/tc-alpha.c:4340 config/tc-alpha.c:4349 config/tc-ppc.c:3726
#: read.c:1393
#, c-format
msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-alpha.c:4455 ecoff.c:3087
+#: config/tc-alpha.c:4451 ecoff.c:3087
msgid ".ent directive has no name"
msgstr ""
-#: config/tc-alpha.c:4463
+#: config/tc-alpha.c:4459
msgid "nested .ent directives"
msgstr ""
-#: config/tc-alpha.c:4499 ecoff.c:3035
+#: config/tc-alpha.c:4495 ecoff.c:3035
msgid ".end directive has no name"
msgstr ""
-#: config/tc-alpha.c:4508
+#: config/tc-alpha.c:4504
msgid ".end directive names different symbol than .ent"
msgstr ""
-#: config/tc-alpha.c:4585
+#: config/tc-alpha.c:4581
#, c-format
msgid "Invalid argument %d to .prologue."
msgstr ""
-#: config/tc-alpha.c:4677
+#: config/tc-alpha.c:4673
msgid "ECOFF debugging is disabled."
msgstr ""
-#: config/tc-alpha.c:4698
+#: config/tc-alpha.c:4694
msgid "Unknown section directive"
msgstr ""
-#: config/tc-alpha.c:4734
+#: config/tc-alpha.c:4730
msgid ".ent directive has no symbol"
msgstr ""
-#: config/tc-alpha.c:4761
+#: config/tc-alpha.c:4757
msgid "Bad .frame directive 1./2. param"
msgstr ""
-#: config/tc-alpha.c:4773
+#: config/tc-alpha.c:4769
msgid "Bad .frame directive 3./4. param"
msgstr ""
-#: config/tc-alpha.c:4798
+#: config/tc-alpha.c:4794
msgid ".pdesc directive not in link (.link) section"
msgstr ""
-#: config/tc-alpha.c:4806
+#: config/tc-alpha.c:4802
msgid ".pdesc has no matching .ent"
msgstr ""
-#: config/tc-alpha.c:4817
+#: config/tc-alpha.c:4813
msgid ".pdesc directive has no entry symbol"
msgstr ""
-#: config/tc-alpha.c:4830
+#: config/tc-alpha.c:4826
msgid "No comma after .pdesc <entryname>"
msgstr ""
-#: config/tc-alpha.c:4853
+#: config/tc-alpha.c:4849
msgid "unknown procedure kind"
msgstr ""
-#: config/tc-alpha.c:4947
+#: config/tc-alpha.c:4942
msgid ".name directive not in link (.link) section"
msgstr ""
-#: config/tc-alpha.c:4955
+#: config/tc-alpha.c:4950
msgid ".name directive has no symbol"
msgstr ""
-#: config/tc-alpha.c:4989
+#: config/tc-alpha.c:4984
msgid "No symbol after .linkage"
msgstr ""
-#: config/tc-alpha.c:5017
+#: config/tc-alpha.c:5012
msgid "No symbol after .code_address"
msgstr ""
-#: config/tc-alpha.c:5050 ecoff.c:3253
+#: config/tc-alpha.c:5045 ecoff.c:3253
msgid "Bad .mask directive"
msgstr ""
-#: config/tc-alpha.c:5071 ecoff.c:3183
+#: config/tc-alpha.c:5066 ecoff.c:3183
msgid "Bad .fmask directive"
msgstr ""
-#: config/tc-alpha.c:5241 config/tc-arm.c:1593 read.c:2150 read.c:2737
+#: config/tc-alpha.c:5236 config/tc-arm.c:1593 read.c:2150 read.c:2737
#: stabs.c:464
#, c-format
msgid "Expected comma after name \"%s\""
msgstr ""
#. *symbol_get_obj (symbolP) = (signed char) temp;
-#: config/tc-alpha.c:5252
+#: config/tc-alpha.c:5247
#, c-format
msgid "unhandled: .proc %s,%d"
msgstr ""
-#: config/tc-alpha.c:5287
+#: config/tc-alpha.c:5282
#, c-format
msgid "Tried to .set unrecognized mode `%s'"
msgstr ""
#. not fatal, but it might not work in the end
-#: config/tc-alpha.c:5304
+#: config/tc-alpha.c:5299
msgid "File overrides no-base-register option."
msgstr ""
-#: config/tc-alpha.c:5321
+#: config/tc-alpha.c:5316
#, c-format
msgid "Bad base register, using $%d."
msgstr ""
-#: config/tc-alpha.c:5343
+#: config/tc-alpha.c:5338
#, c-format
msgid "Alignment too large: %d. assumed"
msgstr ""
-#: config/tc-alpha.c:5347 config/tc-d30v.c:2219
+#: config/tc-alpha.c:5342 config/tc-d30v.c:2219
msgid "Alignment negative: 0 assumed"
msgstr ""
-#: config/tc-alpha.c:5662
+#: config/tc-alpha.c:5654
#, c-format
msgid "Chose GP value of %lx\n"
msgstr ""
-#: config/tc-arc.c:1618 config/tc-arm.c:7532
+#: config/tc-arc.c:1608 config/tc-arm.c:7532
msgid "md_estimate_size_before_relax\n"
msgstr ""
-#: config/tc-arc.c:1630
+#: config/tc-arc.c:1620
msgid "md_convert_frag\n"
msgstr ""
@@ -1407,7 +1409,7 @@ msgstr ""
msgid "Alignment negative. 0 assumed."
msgstr ""
-#: config/tc-arm.c:1643 config/tc-m32r.c:417 read.c:2795 read.c:4857
+#: config/tc-arm.c:1643 config/tc-m32r.c:418 read.c:2795 read.c:4857
#, c-format
msgid "symbol `%s' already defined"
msgstr ""
@@ -1683,7 +1685,7 @@ msgstr ""
#: config/tc-arm.c:4569 config/tc-avr.c:852 config/tc-cris.c:2733
#: config/tc-d10v.c:1560 config/tc-d30v.c:1865 config/tc-mips.c:3230
#: config/tc-mips.c:4162 config/tc-mips.c:4947 config/tc-mips.c:5493
-#: config/tc-ppc.c:4854 config/tc-v850.c:2385
+#: config/tc-ppc.c:4853 config/tc-v850.c:2385
msgid "expression too complex"
msgstr ""
@@ -1947,7 +1949,7 @@ msgstr ""
msgid "Cannot represent %s relocation in this object file format"
msgstr ""
-#: config/tc-arm.c:7514 config/tc-mips.c:11261 config/tc-sh.c:3177
+#: config/tc-arm.c:7514 config/tc-mips.c:11261 config/tc-sh.c:3182
#, c-format
msgid "Can not represent %s relocation in this object file format"
msgstr ""
@@ -2103,7 +2105,7 @@ msgstr ""
#: config/tc-avr.c:372 config/tc-d10v.c:313 config/tc-d30v.c:366
#: config/tc-mips.c:8789 config/tc-mn10200.c:375 config/tc-pj.c:356
-#: config/tc-ppc.c:4518 config/tc-sh.c:2058 config/tc-v850.c:1291
+#: config/tc-ppc.c:4518 config/tc-sh.c:2063 config/tc-v850.c:1291
msgid "bad call to md_atof"
msgstr ""
@@ -2197,7 +2199,7 @@ msgid "only constant expression allowed"
msgstr ""
#: config/tc-avr.c:1060 config/tc-d10v.c:1495 config/tc-d30v.c:1807
-#: config/tc-mn10200.c:1254 config/tc-mn10300.c:1810 config/tc-ppc.c:5161
+#: config/tc-mn10200.c:1254 config/tc-mn10300.c:1810 config/tc-ppc.c:5160
#: config/tc-v850.c:2301
#, c-format
msgid "reloc %d not supported by object file format"
@@ -2205,7 +2207,7 @@ msgstr ""
#: config/tc-avr.c:1084 config/tc-d10v.c:1102 config/tc-d10v.c:1116
#: config/tc-h8300.c:1239 config/tc-h8500.c:1098 config/tc-mcore.c:988
-#: config/tc-pj.c:265 config/tc-sh.c:1640 config/tc-z8k.c:1195
+#: config/tc-pj.c:265 config/tc-sh.c:1645 config/tc-z8k.c:1195
msgid "can't find opcode "
msgstr ""
@@ -2415,8 +2417,8 @@ msgid ""
msgstr ""
#: config/tc-d10v.c:530 config/tc-d30v.c:550 config/tc-mn10200.c:951
-#: config/tc-mn10300.c:1332 config/tc-ppc.c:1972 config/tc-tic80.c:278
-#: config/tc-v850.c:2073
+#: config/tc-mn10300.c:1332 config/tc-ppc.c:1972 config/tc-s390.c:962
+#: config/tc-tic80.c:278 config/tc-v850.c:2073
msgid "illegal operand"
msgstr ""
@@ -2485,7 +2487,7 @@ msgstr ""
msgid "bad opcode or operands"
msgstr ""
-#: config/tc-d10v.c:1353 config/tc-m68k.c:4286
+#: config/tc-d10v.c:1353 config/tc-m68k.c:4296
msgid "value out of range"
msgstr ""
@@ -2653,7 +2655,7 @@ msgstr ""
msgid "Instruction %s not allowed in a delay slot."
msgstr ""
-#: config/tc-fr30.c:380 config/tc-m32r.c:1555
+#: config/tc-fr30.c:380 config/tc-m32r.c:1556
msgid "Addend to unresolved symbol not on word boundary."
msgstr ""
@@ -2734,7 +2736,7 @@ msgid "invalid operands"
msgstr ""
#: config/tc-h8300.c:1250 config/tc-h8500.c:1104 config/tc-mips.c:7984
-#: config/tc-sh.c:1877 config/tc-w65.c:740 config/tc-z8k.c:1205
+#: config/tc-sh.c:1882 config/tc-w65.c:740 config/tc-z8k.c:1205
msgid "unknown opcode"
msgstr ""
@@ -2742,12 +2744,12 @@ msgstr ""
msgid "mismatch between opcode size and operand size"
msgstr ""
-#: config/tc-h8300.c:1307 config/tc-h8500.c:1131 config/tc-sh.c:2013
+#: config/tc-h8300.c:1307 config/tc-h8500.c:1131 config/tc-sh.c:2018
#: config/tc-w65.c:770 config/tc-z8k.c:1258
msgid "call to tc_crawl_symbol_chain \n"
msgstr ""
-#: config/tc-h8300.c:1321 config/tc-h8500.c:1145 config/tc-sh.c:2020
+#: config/tc-h8300.c:1321 config/tc-h8500.c:1145 config/tc-sh.c:2025
#: config/tc-w65.c:784 config/tc-z8k.c:1272
msgid "call to tc_headers_hook \n"
msgstr ""
@@ -2792,448 +2794,448 @@ msgstr ""
msgid "@Rn needs word register"
msgstr ""
-#: config/tc-h8500.c:838 config/tc-sh.c:1357
+#: config/tc-h8500.c:838 config/tc-sh.c:1362
#, c-format
msgid "unhandled %d\n"
msgstr ""
-#: config/tc-h8500.c:866 config/tc-sh.c:1382
+#: config/tc-h8500.c:866 config/tc-sh.c:1387
#, c-format
msgid "operand must be absolute in range %d..%d"
msgstr ""
-#: config/tc-h8500.c:955 config/tc-sh.c:1580
+#: config/tc-h8500.c:955 config/tc-sh.c:1585
#, c-format
msgid "failed for %d\n"
msgstr ""
-#: config/tc-h8500.c:1120 config/tc-sh.c:1681 config/tc-sh.c:1926
+#: config/tc-h8500.c:1120 config/tc-sh.c:1686 config/tc-sh.c:1931
#: config/tc-w65.c:759
msgid "invalid operands for opcode"
msgstr ""
#. Simple range checking for FIELD againt HIGH and LOW bounds.
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1119
+#: config/tc-hppa.c:1144
#, c-format
msgid "Field out of range [%d..%d] (%d)."
msgstr ""
#. Simple alignment checking for FIELD againt ALIGN (a power of two).
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1133
+#: config/tc-hppa.c:1158
#, c-format
msgid "Field not properly aligned [%d] (%d)."
msgstr ""
-#: config/tc-hppa.c:1162
+#: config/tc-hppa.c:1187
msgid "Missing .exit\n"
msgstr ""
-#: config/tc-hppa.c:1165
+#: config/tc-hppa.c:1190
msgid "Missing .procend\n"
msgstr ""
-#: config/tc-hppa.c:1345
+#: config/tc-hppa.c:1370
msgid "Invalid field selector. Assuming F%%."
msgstr ""
-#: config/tc-hppa.c:1372 config/tc-hppa.c:6839 config/tc-hppa.c:6845
-#: config/tc-hppa.c:6851 config/tc-hppa.c:6857 config/tc-mn10300.c:924
+#: config/tc-hppa.c:1397 config/tc-hppa.c:6889 config/tc-hppa.c:6895
+#: config/tc-hppa.c:6901 config/tc-hppa.c:6907 config/tc-mn10300.c:924
#: config/tc-mn10300.c:2133
msgid "could not set architecture and machine"
msgstr ""
-#: config/tc-hppa.c:1378
+#: config/tc-hppa.c:1403
msgid "-R option not supported on this target."
msgstr ""
-#: config/tc-hppa.c:1394 config/tc-sparc.c:802 config/tc-sparc.c:838
+#: config/tc-hppa.c:1419 config/tc-sparc.c:802 config/tc-sparc.c:838
#, c-format
msgid "Internal error: can't hash `%s': %s\n"
msgstr ""
-#: config/tc-hppa.c:1402 config/tc-i860.c:190
+#: config/tc-hppa.c:1427 config/tc-i860.c:190
#, c-format
msgid "internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-hppa.c:1471 config/tc-hppa.c:6978 config/tc-hppa.c:7033
+#: config/tc-hppa.c:1498 config/tc-hppa.c:7028 config/tc-hppa.c:7085
msgid "Missing function name for .PROC (corrupted label chain)"
msgstr ""
-#: config/tc-hppa.c:1474 config/tc-hppa.c:7036
+#: config/tc-hppa.c:1501 config/tc-hppa.c:7088
msgid "Missing function name for .PROC"
msgstr ""
-#: config/tc-hppa.c:1582 config/tc-hppa.c:4812
+#: config/tc-hppa.c:1609 config/tc-hppa.c:4869
msgid "could not update architecture and machine"
msgstr ""
-#: config/tc-hppa.c:1789
+#: config/tc-hppa.c:1816
msgid "Invalid Indexed Load Completer."
msgstr ""
-#: config/tc-hppa.c:1794
+#: config/tc-hppa.c:1821
msgid "Invalid Indexed Load Completer Syntax."
msgstr ""
-#: config/tc-hppa.c:1830
+#: config/tc-hppa.c:1857
msgid "Invalid Short Load/Store Completer."
msgstr ""
-#: config/tc-hppa.c:1889 config/tc-hppa.c:1894
+#: config/tc-hppa.c:1916 config/tc-hppa.c:1921
msgid "Invalid Store Bytes Short Completer"
msgstr ""
-#: config/tc-hppa.c:2205 config/tc-hppa.c:2211
+#: config/tc-hppa.c:2232 config/tc-hppa.c:2238
msgid "Invalid left/right combination completer"
msgstr ""
-#: config/tc-hppa.c:2260 config/tc-hppa.c:2267
+#: config/tc-hppa.c:2287 config/tc-hppa.c:2294
msgid "Invalid permutation completer"
msgstr ""
-#: config/tc-hppa.c:2368
+#: config/tc-hppa.c:2395
#, c-format
msgid "Invalid Add Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2379 config/tc-hppa.c:2389
+#: config/tc-hppa.c:2406 config/tc-hppa.c:2416
#, c-format
msgid "Invalid Add and Branch Condition: %c"
msgstr ""
-#: config/tc-hppa.c:2410
+#: config/tc-hppa.c:2437
msgid "Invalid Compare/Subtract Condition"
msgstr ""
-#: config/tc-hppa.c:2450
+#: config/tc-hppa.c:2477
#, c-format
msgid "Invalid Bit Branch Condition: %c"
msgstr ""
-#: config/tc-hppa.c:2536
+#: config/tc-hppa.c:2563
#, c-format
msgid "Invalid Compare/Subtract Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2548
+#: config/tc-hppa.c:2575
#, c-format
msgid "Invalid Compare/Subtract Condition: %c"
msgstr ""
-#: config/tc-hppa.c:2563
+#: config/tc-hppa.c:2590
msgid "Invalid Compare and Branch Condition."
msgstr ""
-#: config/tc-hppa.c:2659
+#: config/tc-hppa.c:2686
msgid "Invalid Logical Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:2714
+#: config/tc-hppa.c:2741
msgid "Invalid Shift/Extract/Deposit Condition."
msgstr ""
-#: config/tc-hppa.c:2826
+#: config/tc-hppa.c:2853
msgid "Invalid Unit Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:3174 config/tc-hppa.c:3205 config/tc-hppa.c:3238
-#: config/tc-hppa.c:3270
+#: config/tc-hppa.c:3230 config/tc-hppa.c:3262 config/tc-hppa.c:3293
+#: config/tc-hppa.c:3323
msgid "Branch to unaligned address"
msgstr ""
-#: config/tc-hppa.c:3450
+#: config/tc-hppa.c:3501
msgid "Invalid SFU identifier"
msgstr ""
-#: config/tc-hppa.c:3500
+#: config/tc-hppa.c:3551
msgid "Invalid COPR identifier"
msgstr ""
-#: config/tc-hppa.c:3629
+#: config/tc-hppa.c:3680
msgid "Invalid Floating Point Operand Format."
msgstr ""
-#: config/tc-hppa.c:3746 config/tc-hppa.c:3766 config/tc-hppa.c:3786
-#: config/tc-hppa.c:3806 config/tc-hppa.c:3826
+#: config/tc-hppa.c:3797 config/tc-hppa.c:3817 config/tc-hppa.c:3837
+#: config/tc-hppa.c:3857 config/tc-hppa.c:3877
msgid "Invalid register for single precision fmpyadd or fmpysub"
msgstr ""
-#: config/tc-hppa.c:3883
+#: config/tc-hppa.c:3934
#, c-format
msgid "Invalid operands %s"
msgstr ""
-#: config/tc-hppa.c:4001
+#: config/tc-hppa.c:4052
#, c-format
msgid "Cannot handle fixup at %s:%d"
msgstr ""
-#: config/tc-hppa.c:4296
+#: config/tc-hppa.c:4353
msgid " -Q ignored\n"
msgstr ""
-#: config/tc-hppa.c:4300
+#: config/tc-hppa.c:4357
msgid " -c print a warning if a comment is found\n"
msgstr ""
-#: config/tc-hppa.c:4366
+#: config/tc-hppa.c:4423
#, c-format
msgid "no hppa_fixup entry for fixup type 0x%x at %s:%d"
msgstr ""
-#: config/tc-hppa.c:4533
+#: config/tc-hppa.c:4590
msgid "Unknown relocation encountered in md_apply_fix."
msgstr ""
-#: config/tc-hppa.c:4676 config/tc-hppa.c:4701
+#: config/tc-hppa.c:4733 config/tc-hppa.c:4758
#, c-format
msgid "Undefined register: '%s'."
msgstr ""
-#: config/tc-hppa.c:4735
+#: config/tc-hppa.c:4792
#, c-format
msgid "Non-absolute symbol: '%s'."
msgstr ""
-#: config/tc-hppa.c:4750
+#: config/tc-hppa.c:4807
#, c-format
msgid "Undefined absolute constant: '%s'."
msgstr ""
-#: config/tc-hppa.c:4851
+#: config/tc-hppa.c:4908
#, c-format
msgid "Invalid FP Compare Condition: %s"
msgstr ""
-#: config/tc-hppa.c:4907
+#: config/tc-hppa.c:4964
#, c-format
msgid "Invalid FTEST completer: %s"
msgstr ""
-#: config/tc-hppa.c:4974 config/tc-hppa.c:5012
+#: config/tc-hppa.c:5031 config/tc-hppa.c:5069
#, c-format
msgid "Invalid FP Operand Format: %3s"
msgstr ""
-#: config/tc-hppa.c:5091
+#: config/tc-hppa.c:5148
msgid "Bad segment in expression."
msgstr ""
-#: config/tc-hppa.c:5150
+#: config/tc-hppa.c:5207
msgid "Bad segment (should be absolute)."
msgstr ""
-#: config/tc-hppa.c:5193
+#: config/tc-hppa.c:5250
#, c-format
msgid "Invalid argument location: %s\n"
msgstr ""
-#: config/tc-hppa.c:5224
+#: config/tc-hppa.c:5281
#, c-format
msgid "Invalid argument description: %d"
msgstr ""
-#: config/tc-hppa.c:5247
+#: config/tc-hppa.c:5304
#, c-format
msgid "Invalid Nullification: (%c)"
msgstr ""
-#: config/tc-hppa.c:5983
+#: config/tc-hppa.c:6040
#, c-format
msgid "Invalid .CALL argument: %s"
msgstr ""
-#: config/tc-hppa.c:6114
+#: config/tc-hppa.c:6162
msgid ".callinfo is not within a procedure definition"
msgstr ""
-#: config/tc-hppa.c:6134
+#: config/tc-hppa.c:6182
#, c-format
msgid "FRAME parameter must be a multiple of 8: %d\n"
msgstr ""
-#: config/tc-hppa.c:6153
+#: config/tc-hppa.c:6201
msgid "Value for ENTRY_GR must be in the range 3..18\n"
msgstr ""
-#: config/tc-hppa.c:6165
+#: config/tc-hppa.c:6213
msgid "Value for ENTRY_FR must be in the range 12..21\n"
msgstr ""
-#: config/tc-hppa.c:6175
+#: config/tc-hppa.c:6223
msgid "Value for ENTRY_SR must be 3\n"
msgstr ""
-#: config/tc-hppa.c:6231
+#: config/tc-hppa.c:6279
#, c-format
msgid "Invalid .CALLINFO argument: %s"
msgstr ""
-#: config/tc-hppa.c:6342
+#: config/tc-hppa.c:6390
msgid "The .ENTER pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6358
+#: config/tc-hppa.c:6406
msgid "Misplaced .entry. Ignored."
msgstr ""
-#: config/tc-hppa.c:6362
+#: config/tc-hppa.c:6410
msgid "Missing .callinfo."
msgstr ""
-#: config/tc-hppa.c:6426
+#: config/tc-hppa.c:6476
msgid ".REG expression must be a register"
msgstr ""
-#: config/tc-hppa.c:6442 read.c:4728
+#: config/tc-hppa.c:6492 read.c:4728
msgid "bad or irreducible absolute expression; zero assumed"
msgstr ""
-#: config/tc-hppa.c:6453
+#: config/tc-hppa.c:6503
msgid ".REG must use a label"
msgstr ""
-#: config/tc-hppa.c:6455
+#: config/tc-hppa.c:6505
msgid ".EQU must use a label"
msgstr ""
-#: config/tc-hppa.c:6508
+#: config/tc-hppa.c:6558
msgid ".EXIT must appear within a procedure"
msgstr ""
-#: config/tc-hppa.c:6512
+#: config/tc-hppa.c:6562
msgid "Missing .callinfo"
msgstr ""
-#: config/tc-hppa.c:6516
+#: config/tc-hppa.c:6566
msgid "No .ENTRY for this .EXIT"
msgstr ""
-#: config/tc-hppa.c:6543
+#: config/tc-hppa.c:6593
#, c-format
msgid "Cannot define export symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:6601
+#: config/tc-hppa.c:6651
#, c-format
msgid "Using ENTRY rather than CODE in export directive for %s"
msgstr ""
-#: config/tc-hppa.c:6718
+#: config/tc-hppa.c:6768
#, c-format
msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s"
msgstr ""
-#: config/tc-hppa.c:6800
+#: config/tc-hppa.c:6850
msgid "Missing label name on .LABEL"
msgstr ""
-#: config/tc-hppa.c:6805
+#: config/tc-hppa.c:6855
msgid "extra .LABEL arguments ignored."
msgstr ""
-#: config/tc-hppa.c:6822
+#: config/tc-hppa.c:6872
msgid "The .LEAVE pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6861
+#: config/tc-hppa.c:6911
msgid "Unrecognized .LEVEL argument\n"
msgstr ""
-#: config/tc-hppa.c:6897
+#: config/tc-hppa.c:6947
#, c-format
msgid "Cannot define static symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:6932
+#: config/tc-hppa.c:6982
msgid "Nested procedures"
msgstr ""
-#: config/tc-hppa.c:6942
+#: config/tc-hppa.c:6992
msgid "Cannot allocate unwind descriptor\n"
msgstr ""
-#: config/tc-hppa.c:7040
+#: config/tc-hppa.c:7092
msgid "misplaced .procend"
msgstr ""
-#: config/tc-hppa.c:7043
+#: config/tc-hppa.c:7095
msgid "Missing .callinfo for this procedure"
msgstr ""
-#: config/tc-hppa.c:7046
+#: config/tc-hppa.c:7098
msgid "Missing .EXIT for a .ENTRY"
msgstr ""
-#: config/tc-hppa.c:7084
+#: config/tc-hppa.c:7136
msgid "Not in a space.\n"
msgstr ""
-#: config/tc-hppa.c:7087
+#: config/tc-hppa.c:7139
msgid "Not in a subspace.\n"
msgstr ""
-#: config/tc-hppa.c:7178
+#: config/tc-hppa.c:7230
msgid "Invalid .SPACE argument"
msgstr ""
-#: config/tc-hppa.c:7225
+#: config/tc-hppa.c:7277
msgid "Can't change spaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7354
+#: config/tc-hppa.c:7406
#, c-format
msgid "Undefined space: '%s' Assuming space number = 0."
msgstr ""
-#: config/tc-hppa.c:7378
+#: config/tc-hppa.c:7430
msgid "Must be in a space before changing or declaring subspaces.\n"
msgstr ""
-#: config/tc-hppa.c:7382
+#: config/tc-hppa.c:7434
msgid "Can't change subspaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7417
+#: config/tc-hppa.c:7469
msgid "Parameters of an existing subspace can't be modified"
msgstr ""
-#: config/tc-hppa.c:7468
+#: config/tc-hppa.c:7520
msgid "Alignment must be a power of 2"
msgstr ""
-#: config/tc-hppa.c:7510
+#: config/tc-hppa.c:7562
msgid "FIRST not supported as a .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7512
+#: config/tc-hppa.c:7564
msgid "Invalid .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7692
+#: config/tc-hppa.c:7744
#, c-format
msgid "Internal error: Unable to find containing space for %s."
msgstr ""
-#: config/tc-hppa.c:7731
+#: config/tc-hppa.c:7783
#, c-format
msgid "Out of memory: could not allocate new space chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:7817
+#: config/tc-hppa.c:7869
#, c-format
msgid "Out of memory: could not allocate new subspace chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:8511
+#: config/tc-hppa.c:8563
#, c-format
msgid "Symbol '%s' could not be created."
msgstr ""
-#: config/tc-hppa.c:8515
+#: config/tc-hppa.c:8567
msgid "No memory for symbol name."
msgstr ""
@@ -3267,314 +3269,317 @@ msgstr ""
msgid "missing cpu architecture"
msgstr ""
-#: config/tc-i386.c:812 config/tc-i386.c:835 config/tc-m68k.c:3802
+#: config/tc-i386.c:790 config/tc-i386.c:4492
+msgid "Unknown architecture"
+msgstr ""
+
+#: config/tc-i386.c:825 config/tc-i386.c:848 config/tc-m68k.c:3812
#, c-format
msgid "Internal Error: Can't hash %s: %s"
msgstr ""
-#: config/tc-i386.c:1088
+#: config/tc-i386.c:1101
msgid "There are no unsigned pc-relative relocations"
msgstr ""
-#: config/tc-i386.c:1095 config/tc-i386.c:4622
+#: config/tc-i386.c:1108 config/tc-i386.c:4639
#, c-format
msgid "can not do %d byte pc-relative relocation"
msgstr ""
-#: config/tc-i386.c:1112
+#: config/tc-i386.c:1125
#, c-format
msgid "can not do %s %d byte relocation"
msgstr ""
-#: config/tc-i386.c:1221 config/tc-i386.c:1314
+#: config/tc-i386.c:1234 config/tc-i386.c:1327
#, c-format
msgid "no such instruction: `%s'"
msgstr ""
-#: config/tc-i386.c:1230
+#: config/tc-i386.c:1243
#, c-format
msgid "invalid character %s in mnemonic"
msgstr ""
-#: config/tc-i386.c:1237
+#: config/tc-i386.c:1250
msgid "expecting prefix; got nothing"
msgstr ""
-#: config/tc-i386.c:1239
+#: config/tc-i386.c:1252
msgid "expecting mnemonic; got nothing"
msgstr ""
-#: config/tc-i386.c:1257
+#: config/tc-i386.c:1270
#, c-format
msgid "redundant %s prefix"
msgstr ""
-#: config/tc-i386.c:1325
+#: config/tc-i386.c:1338
#, c-format
msgid "`%s' is not supported on `%s'"
msgstr ""
-#: config/tc-i386.c:1330
+#: config/tc-i386.c:1343
msgid "use .code16 to ensure correct addressing mode"
msgstr ""
-#: config/tc-i386.c:1338
+#: config/tc-i386.c:1351
#, c-format
msgid "expecting string instruction after `%s'"
msgstr ""
-#: config/tc-i386.c:1359
+#: config/tc-i386.c:1372
#, c-format
msgid "invalid character %s before operand %d"
msgstr ""
-#: config/tc-i386.c:1373
+#: config/tc-i386.c:1386
#, c-format
msgid "unbalanced parenthesis in operand %d."
msgstr ""
-#: config/tc-i386.c:1376
+#: config/tc-i386.c:1389
#, c-format
msgid "unbalanced brackets in operand %d."
msgstr ""
-#: config/tc-i386.c:1385
+#: config/tc-i386.c:1398
#, c-format
msgid "invalid character %s in operand %d"
msgstr ""
-#: config/tc-i386.c:1412
+#: config/tc-i386.c:1425
#, c-format
msgid "spurious operands; (%d operands/instruction max)"
msgstr ""
-#: config/tc-i386.c:1435
+#: config/tc-i386.c:1448
msgid "expecting operand after ','; got nothing"
msgstr ""
-#: config/tc-i386.c:1440
+#: config/tc-i386.c:1453
msgid "expecting operand before ','; got nothing"
msgstr ""
#. We found no match.
-#: config/tc-i386.c:1782
+#: config/tc-i386.c:1801
#, c-format
msgid "suffix or operands invalid for `%s'"
msgstr ""
-#: config/tc-i386.c:1793
+#: config/tc-i386.c:1812
#, c-format
msgid "indirect %s without `*'"
msgstr ""
#. Warn them that a data or address size prefix doesn't
#. affect assembly of the next line of code.
-#: config/tc-i386.c:1801
+#: config/tc-i386.c:1820
#, c-format
msgid "stand-alone `%s' prefix"
msgstr ""
-#: config/tc-i386.c:1837 config/tc-i386.c:1852
+#: config/tc-i386.c:1856 config/tc-i386.c:1871
msgid "`%s' operand %d must use `%%es' segment"
msgstr ""
-#: config/tc-i386.c:1867
+#: config/tc-i386.c:1886
msgid "Extended register `%%%s' available only in 64bit mode."
msgstr ""
#. Prohibit these changes in the 64bit mode, since
#. the lowering is more complicated.
-#: config/tc-i386.c:1938 config/tc-i386.c:1989 config/tc-i386.c:2004
-#: config/tc-i386.c:2032 config/tc-i386.c:2060
+#: config/tc-i386.c:1957 config/tc-i386.c:2008 config/tc-i386.c:2023
+#: config/tc-i386.c:2051 config/tc-i386.c:2079
msgid "Incorrect register `%%%s' used with`%c' suffix"
msgstr ""
-#: config/tc-i386.c:1944 config/tc-i386.c:1994 config/tc-i386.c:2065
+#: config/tc-i386.c:1963 config/tc-i386.c:2013 config/tc-i386.c:2084
msgid "using `%%%s' instead of `%%%s' due to `%c' suffix"
msgstr ""
-#: config/tc-i386.c:1957 config/tc-i386.c:1975 config/tc-i386.c:2019
-#: config/tc-i386.c:2046
+#: config/tc-i386.c:1976 config/tc-i386.c:1994 config/tc-i386.c:2038
+#: config/tc-i386.c:2065
msgid "`%%%s' not allowed with `%s%c'"
msgstr ""
-#: config/tc-i386.c:2106
+#: config/tc-i386.c:2125
msgid "no instruction mnemonic suffix given; can't determine immediate size"
msgstr ""
-#: config/tc-i386.c:2132
+#: config/tc-i386.c:2151
#, c-format
msgid ""
"no instruction mnemonic suffix given; can't determine immediate size %x %c"
msgstr ""
-#: config/tc-i386.c:2157
+#: config/tc-i386.c:2176
msgid ""
"no instruction mnemonic suffix given and no register operands; can't size "
"instruction"
msgstr ""
-#: config/tc-i386.c:2205
+#: config/tc-i386.c:2224
msgid "64bit operations available only in 64bit modes."
msgstr ""
#. Reversed arguments on faddp, fsubp, etc.
-#: config/tc-i386.c:2273
+#: config/tc-i386.c:2292
msgid "translating to `%s %%%s,%%%s'"
msgstr ""
#. Extraneous `l' suffix on fp insn.
-#: config/tc-i386.c:2280
+#: config/tc-i386.c:2299
msgid "translating to `%s %%%s'"
msgstr ""
-#: config/tc-i386.c:2551
+#: config/tc-i386.c:2572
msgid "you can't `pop %%cs'"
msgstr ""
#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc.
-#: config/tc-i386.c:2584
+#: config/tc-i386.c:2605
#, c-format
msgid "translating to `%sp'"
msgstr ""
-#: config/tc-i386.c:2627
+#: config/tc-i386.c:2648
msgid ""
"Can't encode registers '%%%s' in the instruction requiring REX prefix.\n"
msgstr ""
-#: config/tc-i386.c:2679 config/tc-i386.c:2751 config/tc-i386.c:2798
+#: config/tc-i386.c:2700 config/tc-i386.c:2772 config/tc-i386.c:2819
msgid "skipping prefixes on this instruction"
msgstr ""
-#: config/tc-i386.c:2819
+#: config/tc-i386.c:2840
msgid "16-bit jump out of range"
msgstr ""
-#: config/tc-i386.c:2828
+#: config/tc-i386.c:2849
#, c-format
msgid "can't handle non absolute segment in `%s'"
msgstr ""
-#: config/tc-i386.c:3085
+#: config/tc-i386.c:3106
msgid "only 1 or 2 immediate operands are allowed"
msgstr ""
-#: config/tc-i386.c:3115 config/tc-i386.c:3353
+#: config/tc-i386.c:3136 config/tc-i386.c:3374
msgid "GOT relocations not supported in 16 bit mode"
msgstr ""
-#: config/tc-i386.c:3152 config/tc-i386.c:3389
+#: config/tc-i386.c:3173 config/tc-i386.c:3410
msgid "bad reloc specifier in expression"
msgstr ""
-#: config/tc-i386.c:3170 config/tc-i386.c:3424
+#: config/tc-i386.c:3191 config/tc-i386.c:3445
#, c-format
msgid "ignoring junk `%s' after expression"
msgstr ""
#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:3177
+#: config/tc-i386.c:3198
#, c-format
msgid "missing or invalid immediate expression `%s' taken as 0"
msgstr ""
-#: config/tc-i386.c:3208 config/tc-i386.c:3454
+#: config/tc-i386.c:3229 config/tc-i386.c:3475
#, c-format
msgid "unimplemented segment %s in operand"
msgstr ""
-#: config/tc-i386.c:3210 config/tc-i386.c:3456
+#: config/tc-i386.c:3231 config/tc-i386.c:3477
#, c-format
msgid "unimplemented segment type %d in operand"
msgstr ""
-#: config/tc-i386.c:3252 config/tc-i386.c:5392
+#: config/tc-i386.c:3273 config/tc-i386.c:5407
#, c-format
msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'"
msgstr ""
-#: config/tc-i386.c:3258
+#: config/tc-i386.c:3279
#, c-format
msgid "scale factor of %d without an index register"
msgstr ""
#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:3435
+#: config/tc-i386.c:3456
#, c-format
msgid "missing or invalid displacement expression `%s' taken as 0"
msgstr ""
-#: config/tc-i386.c:3541
+#: config/tc-i386.c:3562
#, c-format
msgid "`%s' is not a valid base/index expression"
msgstr ""
-#: config/tc-i386.c:3545
+#: config/tc-i386.c:3566
#, c-format
msgid "`%s' is not a valid %s bit base/index expression"
msgstr ""
-#: config/tc-i386.c:3620
+#: config/tc-i386.c:3641
#, c-format
msgid "bad memory operand `%s'"
msgstr ""
-#: config/tc-i386.c:3635
+#: config/tc-i386.c:3656
#, c-format
msgid "junk `%s' after register"
msgstr ""
-#: config/tc-i386.c:3644 config/tc-i386.c:3759 config/tc-i386.c:3795
+#: config/tc-i386.c:3665 config/tc-i386.c:3780 config/tc-i386.c:3816
#, c-format
msgid "bad register name `%s'"
msgstr ""
-#: config/tc-i386.c:3652
+#: config/tc-i386.c:3673
msgid "immediate operand illegal with absolute jump"
msgstr ""
-#: config/tc-i386.c:3674
+#: config/tc-i386.c:3695
#, c-format
msgid "too many memory references for `%s'"
msgstr ""
-#: config/tc-i386.c:3752
+#: config/tc-i386.c:3773
#, c-format
msgid "expecting `,' or `)' after index register in `%s'"
msgstr ""
-#: config/tc-i386.c:3774
+#: config/tc-i386.c:3795
#, c-format
msgid "expecting `)' after scale factor in `%s'"
msgstr ""
-#: config/tc-i386.c:3781
+#: config/tc-i386.c:3802
#, c-format
msgid "expecting index register or scale factor after `,'; got '%c'"
msgstr ""
-#: config/tc-i386.c:3788
+#: config/tc-i386.c:3809
#, c-format
msgid "expecting `,' or `)' after base register in `%s'"
msgstr ""
#. It's not a memory operand; argh!
-#: config/tc-i386.c:3829
+#: config/tc-i386.c:3850
#, c-format
msgid "invalid char %s beginning operand %d `%s'"
msgstr ""
-#: config/tc-i386.c:4267
+#: config/tc-i386.c:4288
msgid "Bad call to md_atof ()"
msgstr ""
-#: config/tc-i386.c:4431 config/tc-sparc.c:548
-#, c-format
-msgid "No compiled in support for %d bit object file format"
+#: config/tc-i386.c:4445
+msgid "No compiled in support for x86_64"
msgstr ""
-#: config/tc-i386.c:4449
+#: config/tc-i386.c:4466
msgid ""
" -Q ignored\n"
" -V print assembler version number\n"
@@ -3583,67 +3588,63 @@ msgid ""
" -s ignored\n"
msgstr ""
-#: config/tc-i386.c:4456
+#: config/tc-i386.c:4473
msgid " -q quieten some warnings\n"
msgstr ""
-#: config/tc-i386.c:4475
-msgid "Unknown architecture"
-msgstr ""
-
-#: config/tc-i386.c:4515
+#: config/tc-i386.c:4532 config/tc-s390.c:1446
msgid "GOT already in symbol table"
msgstr ""
-#: config/tc-i386.c:4636
+#: config/tc-i386.c:4653
#, c-format
msgid "can not do %d byte relocation"
msgstr ""
-#: config/tc-i386.c:4697
+#: config/tc-i386.c:4713 config/tc-s390.c:1746
#, c-format
msgid "cannot represent relocation type %s"
msgstr ""
-#: config/tc-i386.c:4994
+#: config/tc-i386.c:5009
#, c-format
msgid "too many memory references for '%s'"
msgstr ""
-#: config/tc-i386.c:5157
+#: config/tc-i386.c:5172
#, c-format
msgid "Unknown operand modifier `%s'\n"
msgstr ""
-#: config/tc-i386.c:5364
+#: config/tc-i386.c:5379
#, c-format
msgid "`%s' is not a valid segment register"
msgstr ""
-#: config/tc-i386.c:5374 config/tc-i386.c:5495
+#: config/tc-i386.c:5389 config/tc-i386.c:5510
msgid "Register scaling only allowed in memory operands."
msgstr ""
-#: config/tc-i386.c:5405
+#: config/tc-i386.c:5420
msgid "Too many register references in memory operand.\n"
msgstr ""
-#: config/tc-i386.c:5474
+#: config/tc-i386.c:5489
#, c-format
msgid "Syntax error. Expecting a constant. Got `%s'.\n"
msgstr ""
-#: config/tc-i386.c:5544
+#: config/tc-i386.c:5559
#, c-format
msgid "Unrecognized token '%s'"
msgstr ""
-#: config/tc-i386.c:5561
+#: config/tc-i386.c:5576
#, c-format
msgid "Unexpected token `%s'\n"
msgstr ""
-#: config/tc-i386.c:5705
+#: config/tc-i386.c:5720
#, c-format
msgid "Unrecognized token `%s'\n"
msgstr ""
@@ -3900,106 +3901,110 @@ msgstr ""
msgid "ignoring unrecognized .endian type `%s'"
msgstr ""
-#: config/tc-i960.c:3064
+#: config/tc-i960.c:3063
#, c-format
msgid "leafproc symbol '%s' undefined"
msgstr ""
-#: config/tc-i960.c:3074
+#: config/tc-i960.c:3073
#, c-format
msgid "Warning: making leafproc entries %s and %s both global\n"
msgstr ""
-#: config/tc-i960.c:3183
+#: config/tc-i960.c:3182
msgid "option --link-relax is only supported in b.out format"
msgstr ""
-#: config/tc-i960.c:3226
+#: config/tc-i960.c:3225
msgid "callj to difference of two symbols"
msgstr ""
-#: config/tc-ia64.c:4077
+#: config/tc-ia64.c:952
+msgid "Unwind directive not followed by an instruction."
+msgstr ""
+
+#: config/tc-ia64.c:4094
msgid "Register name expected"
msgstr ""
-#: config/tc-ia64.c:4082 config/tc-ia64.c:4368
+#: config/tc-ia64.c:4099 config/tc-ia64.c:4385
msgid "Comma expected"
msgstr ""
-#: config/tc-ia64.c:4090
+#: config/tc-ia64.c:4107
msgid "Register value annotation ignored"
msgstr ""
-#: config/tc-ia64.c:4114
+#: config/tc-ia64.c:4131
msgid "Directive invalid within a bundle"
msgstr ""
-#: config/tc-ia64.c:4181
+#: config/tc-ia64.c:4198
msgid "Missing predicate relation type"
msgstr ""
-#: config/tc-ia64.c:4197
+#: config/tc-ia64.c:4214
msgid "Unrecognized predicate relation type"
msgstr ""
-#: config/tc-ia64.c:4217 config/tc-ia64.c:4242
+#: config/tc-ia64.c:4234 config/tc-ia64.c:4259
msgid "Predicate register expected"
msgstr ""
-#: config/tc-ia64.c:4229
+#: config/tc-ia64.c:4246
msgid "Duplicate predicate register ignored"
msgstr ""
-#: config/tc-ia64.c:4251
+#: config/tc-ia64.c:4268
msgid "Bad register range"
msgstr ""
-#: config/tc-ia64.c:4279
+#: config/tc-ia64.c:4296
msgid "Predicate source and target required"
msgstr ""
-#: config/tc-ia64.c:4281 config/tc-ia64.c:4293
+#: config/tc-ia64.c:4298 config/tc-ia64.c:4310
msgid "Use of p0 is not valid in this context"
msgstr ""
-#: config/tc-ia64.c:4288
+#: config/tc-ia64.c:4305
msgid "At least two PR arguments expected"
msgstr ""
-#: config/tc-ia64.c:4302
+#: config/tc-ia64.c:4319
msgid "At least one PR argument expected"
msgstr ""
-#: config/tc-ia64.c:4338
+#: config/tc-ia64.c:4355
#, c-format
msgid "Inserting \"%s\" into entry hint table failed: %s"
msgstr ""
#. FIXME -- need 62-bit relocation type
-#: config/tc-ia64.c:4758
+#: config/tc-ia64.c:4775
msgid "62-bit relocation not yet implemented"
msgstr ""
-#: config/tc-ia64.c:4820
+#: config/tc-ia64.c:4837
msgid "lower 16 bits of mask ignored"
msgstr ""
-#: config/tc-ia64.c:5317
+#: config/tc-ia64.c:5337
msgid "Value truncated to 62 bits"
msgstr ""
-#: config/tc-ia64.c:5668
+#: config/tc-ia64.c:5688
msgid ""
"Additional NOP may be necessary to workaround Itanium processor A/B step "
"errata"
msgstr ""
-#: config/tc-ia64.c:5849
+#: config/tc-ia64.c:5870
#, c-format
msgid "Unrecognized option '-x%s'"
msgstr ""
-#: config/tc-ia64.c:5877
+#: config/tc-ia64.c:5898
msgid ""
"IA-64 options:\n"
" -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n"
@@ -4009,33 +4014,33 @@ msgid ""
" -xdebug\t\t debug dependency violation checker\n"
msgstr ""
-#: config/tc-ia64.c:6147 config/tc-mips.c:1014
+#: config/tc-ia64.c:6168 config/tc-mips.c:1014
msgid "Could not set architecture and machine"
msgstr ""
-#: config/tc-ia64.c:6223
+#: config/tc-ia64.c:6244
msgid "Explicit stops are ignored in auto mode"
msgstr ""
-#: config/tc-ia64.c:6273
+#: config/tc-ia64.c:6294
msgid "Found '{' after explicit switch to automatic mode"
msgstr ""
-#: config/tc-ia64.c:6686
+#: config/tc-ia64.c:6707
#, c-format
msgid "Unhandled dependency %s for %s (%s), note %d"
msgstr ""
-#: config/tc-ia64.c:7962
+#: config/tc-ia64.c:7983
#, c-format
msgid "Unrecognized dependency specifier %d\n"
msgstr ""
-#: config/tc-ia64.c:8753
+#: config/tc-ia64.c:8774
msgid "Only the first path encountering the conflict is reported"
msgstr ""
-#: config/tc-ia64.c:8756
+#: config/tc-ia64.c:8777
msgid "This is the location of the conflicting usage"
msgstr ""
@@ -4115,82 +4120,82 @@ msgstr ""
msgid " -cpu-desc provide runtime cpu description file\n"
msgstr ""
-#: config/tc-m32r.c:688
+#: config/tc-m32r.c:689
msgid "Instructions write to the same destination register."
msgstr ""
-#: config/tc-m32r.c:696
+#: config/tc-m32r.c:697
msgid "Instructions do not use parallel execution pipelines."
msgstr ""
-#: config/tc-m32r.c:703
+#: config/tc-m32r.c:704
msgid "Instructions share the same execution pipeline"
msgstr ""
-#: config/tc-m32r.c:773 config/tc-m32r.c:870
+#: config/tc-m32r.c:774 config/tc-m32r.c:871
#, c-format
msgid "not a 16 bit instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:780 config/tc-m32r.c:877 config/tc-m32r.c:1033
+#: config/tc-m32r.c:781 config/tc-m32r.c:878 config/tc-m32r.c:1034
#, c-format
msgid "unknown instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:789 config/tc-m32r.c:884 config/tc-m32r.c:1040
+#: config/tc-m32r.c:790 config/tc-m32r.c:885 config/tc-m32r.c:1041
#, c-format
msgid "instruction '%s' is for the M32RX only"
msgstr ""
-#: config/tc-m32r.c:798 config/tc-m32r.c:893
+#: config/tc-m32r.c:799 config/tc-m32r.c:894
#, c-format
msgid "instruction '%s' cannot be executed in parallel."
msgstr ""
-#: config/tc-m32r.c:854 config/tc-m32r.c:918 config/tc-m32r.c:1090
+#: config/tc-m32r.c:855 config/tc-m32r.c:919 config/tc-m32r.c:1091
msgid "internal error: lookup/get operands failed"
msgstr ""
-#: config/tc-m32r.c:903
+#: config/tc-m32r.c:904
#, c-format
msgid "'%s': only the NOP instruction can be issued in parallel on the m32r"
msgstr ""
-#: config/tc-m32r.c:932
+#: config/tc-m32r.c:933
#, c-format
msgid ""
"%s: output of 1st instruction is the same as an input to 2nd instruction - "
"is this intentional ?"
msgstr ""
-#: config/tc-m32r.c:936
+#: config/tc-m32r.c:937
#, c-format
msgid ""
"%s: output of 2nd instruction is the same as an input to 1st instruction - "
"is this intentional ?"
msgstr ""
-#: config/tc-m32r.c:1250 config/tc-ppc.c:1459 config/tc-ppc.c:3681 read.c:1358
+#: config/tc-m32r.c:1251 config/tc-ppc.c:1459 config/tc-ppc.c:3681 read.c:1358
msgid "Expected comma after symbol-name: rest of line ignored."
msgstr ""
-#: config/tc-m32r.c:1260
+#: config/tc-m32r.c:1261
#, c-format
msgid ".SCOMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-m32r.c:1274 config/tc-ppc.c:1481 config/tc-ppc.c:2392
+#: config/tc-m32r.c:1275 config/tc-ppc.c:1481 config/tc-ppc.c:2392
#: config/tc-ppc.c:3705
msgid "ignoring bad alignment"
msgstr ""
-#: config/tc-m32r.c:1301 config/tc-ppc.c:1492 config/tc-ppc.c:3717 read.c:1382
+#: config/tc-m32r.c:1302 config/tc-ppc.c:1492 config/tc-ppc.c:3717 read.c:1382
#: read.c:2108
#, c-format
msgid "Ignoring attempt to re-define symbol `%s'."
msgstr ""
-#: config/tc-m32r.c:1310
+#: config/tc-m32r.c:1311
#, c-format
msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
@@ -4199,7 +4204,7 @@ msgstr ""
msgid "Unmatched high/shigh reloc"
msgstr ""
-#: config/tc-m68hc11.c:305
+#: config/tc-m68hc11.c:308
#, c-format
msgid ""
"Motorola 68HC11/68HC12 options:\n"
@@ -4215,55 +4220,55 @@ msgid ""
" (used for testing)\n"
msgstr ""
-#: config/tc-m68hc11.c:346
+#: config/tc-m68hc11.c:349
#, c-format
msgid "Default target `%s' is not supported."
msgstr ""
#. Dump the opcode statistics table.
-#: config/tc-m68hc11.c:365
+#: config/tc-m68hc11.c:368
msgid "Name # Modes Min ops Max ops Modes mask # Used\n"
msgstr ""
-#: config/tc-m68hc11.c:415
+#: config/tc-m68hc11.c:418
#, c-format
msgid "Option `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:636
+#: config/tc-m68hc11.c:639
msgid "#<imm8>"
msgstr ""
-#: config/tc-m68hc11.c:645
+#: config/tc-m68hc11.c:648
msgid "#<imm16>"
msgstr ""
-#: config/tc-m68hc11.c:654 config/tc-m68hc11.c:663
+#: config/tc-m68hc11.c:657 config/tc-m68hc11.c:666
msgid "<imm8>,X"
msgstr ""
-#: config/tc-m68hc11.c:681
+#: config/tc-m68hc11.c:684
msgid "*<abs8>"
msgstr ""
-#: config/tc-m68hc11.c:693
+#: config/tc-m68hc11.c:696
msgid "#<mask>"
msgstr ""
-#: config/tc-m68hc11.c:703
+#: config/tc-m68hc11.c:706
#, c-format
msgid "symbol%d"
msgstr ""
-#: config/tc-m68hc11.c:705
+#: config/tc-m68hc11.c:708
msgid "<abs>"
msgstr ""
-#: config/tc-m68hc11.c:724
+#: config/tc-m68hc11.c:727
msgid "<label>"
msgstr ""
-#: config/tc-m68hc11.c:740
+#: config/tc-m68hc11.c:743
#, c-format
msgid ""
"# Example of `%s' instructions\n"
@@ -4271,243 +4276,243 @@ msgid ""
"_start:\n"
msgstr ""
-#: config/tc-m68hc11.c:788
+#: config/tc-m68hc11.c:791
#, c-format
msgid "Instruction `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:793
+#: config/tc-m68hc11.c:796
#, c-format
msgid "Instruction formats for `%s':"
msgstr ""
-#: config/tc-m68hc11.c:926
+#: config/tc-m68hc11.c:929
#, c-format
msgid "Immediate operand is not allowed for operand %d."
msgstr ""
-#: config/tc-m68hc11.c:952
+#: config/tc-m68hc11.c:955
msgid "Indirect indexed addressing is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:972
+#: config/tc-m68hc11.c:975
msgid "Spurious `,' or bad indirect register addressing mode."
msgstr ""
-#: config/tc-m68hc11.c:988
+#: config/tc-m68hc11.c:991
msgid "Missing second register or offset for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:998
+#: config/tc-m68hc11.c:1001
msgid "Missing second register for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1014
+#: config/tc-m68hc11.c:1017
msgid "Missing `]' to close indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1058
+#: config/tc-m68hc11.c:1061
msgid "Illegal operand."
msgstr ""
-#: config/tc-m68hc11.c:1063
+#: config/tc-m68hc11.c:1066
msgid "Missing operand."
msgstr ""
-#: config/tc-m68hc11.c:1115
+#: config/tc-m68hc11.c:1118
msgid "Pre-increment mode is not valid for 68HC11"
msgstr ""
-#: config/tc-m68hc11.c:1128
+#: config/tc-m68hc11.c:1131
msgid "Wrong register in register indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1136
+#: config/tc-m68hc11.c:1139
msgid "Missing `]' to close register indirect operand."
msgstr ""
-#: config/tc-m68hc11.c:1153
+#: config/tc-m68hc11.c:1156
msgid "Post-decrement mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1161
+#: config/tc-m68hc11.c:1164
msgid "Post-increment mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1178
+#: config/tc-m68hc11.c:1181
msgid "Invalid indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1272
+#: config/tc-m68hc11.c:1275
#, c-format
msgid "Trap id `%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:1276
+#: config/tc-m68hc11.c:1279
msgid "Trap id must be within [0x30..0x39] or [0x40..0xff]."
msgstr ""
-#: config/tc-m68hc11.c:1283
+#: config/tc-m68hc11.c:1286
#, c-format
msgid "Operand out of 8-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1290
+#: config/tc-m68hc11.c:1293
msgid "The trap id must be a constant."
msgstr ""
-#: config/tc-m68hc11.c:1315
+#: config/tc-m68hc11.c:1318
#, c-format
msgid "Operand `%x' not recognized in fixup8."
msgstr ""
-#: config/tc-m68hc11.c:1335
+#: config/tc-m68hc11.c:1338
#, c-format
msgid "Operand out of 16-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1356
+#: config/tc-m68hc11.c:1359
#, c-format
msgid "Operand `%x' not recognized in fixup16."
msgstr ""
-#: config/tc-m68hc11.c:1374
+#: config/tc-m68hc11.c:1377
#, c-format
msgid "Unexpected branch conversion with `%x'"
msgstr ""
-#: config/tc-m68hc11.c:1463 config/tc-m68hc11.c:1592
+#: config/tc-m68hc11.c:1464 config/tc-m68hc11.c:1591
#, c-format
msgid "Operand out of range for a relative branch: `%ld'"
msgstr ""
-#: config/tc-m68hc11.c:1560
+#: config/tc-m68hc11.c:1559
msgid "Invalid register for dbcc/tbcc instruction."
msgstr ""
-#: config/tc-m68hc11.c:1651
+#: config/tc-m68hc11.c:1650
#, c-format
msgid "Increment/decrement value is out of range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1662
+#: config/tc-m68hc11.c:1661
msgid "Expecting a register."
msgstr ""
-#: config/tc-m68hc11.c:1677
+#: config/tc-m68hc11.c:1676
msgid "Invalid register for post/pre increment."
msgstr ""
-#: config/tc-m68hc11.c:1707
+#: config/tc-m68hc11.c:1706
msgid "Invalid register."
msgstr ""
-#: config/tc-m68hc11.c:1714
+#: config/tc-m68hc11.c:1713
#, c-format
msgid "Offset out of 16-bit range: %ld."
msgstr ""
-#: config/tc-m68hc11.c:1719
+#: config/tc-m68hc11.c:1718
#, c-format
msgid "Offset out of 5-bit range for movw/movb insn: %ld."
msgstr ""
-#: config/tc-m68hc11.c:1774
+#: config/tc-m68hc11.c:1784
msgid "Expecting register D for indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1776
+#: config/tc-m68hc11.c:1786
msgid "Indexed indirect mode is not allowed for movb/movw."
msgstr ""
-#: config/tc-m68hc11.c:1793
+#: config/tc-m68hc11.c:1803
msgid "Invalid accumulator register."
msgstr ""
-#: config/tc-m68hc11.c:1818
+#: config/tc-m68hc11.c:1828
msgid "Invalid indexed register."
msgstr ""
-#: config/tc-m68hc11.c:1826
+#: config/tc-m68hc11.c:1836
msgid "Addressing mode not implemented yet."
msgstr ""
-#: config/tc-m68hc11.c:1841
+#: config/tc-m68hc11.c:1851
msgid "Invalid source register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:1843
+#: config/tc-m68hc11.c:1853
msgid "Invalid source register."
msgstr ""
-#: config/tc-m68hc11.c:1848
+#: config/tc-m68hc11.c:1858
msgid "Invalid destination register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:1850
+#: config/tc-m68hc11.c:1860
msgid "Invalid destination register."
msgstr ""
-#: config/tc-m68hc11.c:1939
+#: config/tc-m68hc11.c:1945
msgid "Invalid indexed register, expecting register X."
msgstr ""
-#: config/tc-m68hc11.c:1941
+#: config/tc-m68hc11.c:1947
msgid "Invalid indexed register, expecting register Y."
msgstr ""
-#: config/tc-m68hc11.c:2238
+#: config/tc-m68hc11.c:2239
msgid "No instruction or missing opcode."
msgstr ""
-#: config/tc-m68hc11.c:2303
+#: config/tc-m68hc11.c:2304
#, c-format
msgid "Opcode `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:2325
+#: config/tc-m68hc11.c:2326
#, c-format
msgid "Garbage at end of instruction: `%s'."
msgstr ""
-#: config/tc-m68hc11.c:2348
+#: config/tc-m68hc11.c:2349
#, c-format
msgid "Invalid operand for `%s'"
msgstr ""
-#: config/tc-m68hc11.c:2405
+#: config/tc-m68hc11.c:2406
#, c-format
msgid "Relocation %d is not supported by object file format."
msgstr ""
-#: config/tc-m68hc11.c:2571
+#: config/tc-m68hc11.c:2587
msgid "bra or bsr with undefined symbol."
msgstr ""
-#: config/tc-m68hc11.c:2683
+#: config/tc-m68hc11.c:2698
#, c-format
msgid "Subtype %d is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:2720
+#: config/tc-m68hc11.c:2735
msgid "Expression too complex."
msgstr ""
-#: config/tc-m68hc11.c:2749
+#: config/tc-m68hc11.c:2764
msgid "Value out of 16-bit range."
msgstr ""
-#: config/tc-m68hc11.c:2772
+#: config/tc-m68hc11.c:2787
#, c-format
msgid "Value %ld too large for 8-bit PC-relative branch."
msgstr ""
-#: config/tc-m68hc11.c:2779
+#: config/tc-m68hc11.c:2794
#, c-format
msgid "Auto increment/decrement offset '%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:2790
+#: config/tc-m68hc11.c:2805
#, c-format
msgid "Line %d: unknown relocation type: 0x%x."
msgstr ""
@@ -4536,318 +4541,323 @@ msgstr ""
msgid "Can not do %d byte pic relocation"
msgstr ""
-#: config/tc-m68k.c:919 config/tc-mips.c:11242
+#: config/tc-m68k.c:885
+#, c-format
+msgid "Unable to produce reloc against symbol '%s'"
+msgstr ""
+
+#: config/tc-m68k.c:929 config/tc-mips.c:11242
#, c-format
msgid "Cannot make %s relocation PC relative"
msgstr ""
-#: config/tc-m68k.c:1032 config/tc-tahoe.c:1503 config/tc-vax.c:1766
+#: config/tc-m68k.c:1042 config/tc-tahoe.c:1503 config/tc-vax.c:1766
msgid "No operator"
msgstr ""
-#: config/tc-m68k.c:1062 config/tc-tahoe.c:1520 config/tc-vax.c:1783
+#: config/tc-m68k.c:1072 config/tc-tahoe.c:1520 config/tc-vax.c:1783
msgid "Unknown operator"
msgstr ""
-#: config/tc-m68k.c:1837
+#: config/tc-m68k.c:1847
msgid "invalid instruction for this architecture; needs "
msgstr ""
-#: config/tc-m68k.c:1842
+#: config/tc-m68k.c:1852
msgid "fpu (68040, 68060 or 68881/68882)"
msgstr ""
-#: config/tc-m68k.c:1845
+#: config/tc-m68k.c:1855
msgid "mmu (68030 or 68851)"
msgstr ""
-#: config/tc-m68k.c:1848
+#: config/tc-m68k.c:1858
msgid "68020 or higher"
msgstr ""
-#: config/tc-m68k.c:1851
+#: config/tc-m68k.c:1861
msgid "68000 or higher"
msgstr ""
-#: config/tc-m68k.c:1854
+#: config/tc-m68k.c:1864
msgid "68010 or higher"
msgstr ""
-#: config/tc-m68k.c:1883
+#: config/tc-m68k.c:1893
msgid "operands mismatch"
msgstr ""
-#: config/tc-m68k.c:1940 config/tc-m68k.c:1946 config/tc-m68k.c:1952
+#: config/tc-m68k.c:1950 config/tc-m68k.c:1956 config/tc-m68k.c:1962
msgid "operand out of range"
msgstr ""
-#: config/tc-m68k.c:2009
+#: config/tc-m68k.c:2019
#, c-format
msgid "Bignum too big for %c format; truncated"
msgstr ""
-#: config/tc-m68k.c:2077
+#: config/tc-m68k.c:2087
msgid "displacement too large for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2187
+#: config/tc-m68k.c:2197
msgid ""
"scale factor invalid on this architecture; needs cpu32 or 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2192
+#: config/tc-m68k.c:2202
msgid "invalid index size for coldfire"
msgstr ""
-#: config/tc-m68k.c:2245
+#: config/tc-m68k.c:2255
msgid "Forcing byte displacement"
msgstr ""
-#: config/tc-m68k.c:2247
+#: config/tc-m68k.c:2257
msgid "byte displacement out of range"
msgstr ""
-#: config/tc-m68k.c:2294 config/tc-m68k.c:2332
+#: config/tc-m68k.c:2304 config/tc-m68k.c:2342
msgid "invalid operand mode for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2318 config/tc-m68k.c:2352
+#: config/tc-m68k.c:2328 config/tc-m68k.c:2362
msgid ":b not permitted; defaulting to :w"
msgstr ""
-#: config/tc-m68k.c:2429
+#: config/tc-m68k.c:2439
msgid "unsupported byte value; use a different suffix"
msgstr ""
-#: config/tc-m68k.c:2443
+#: config/tc-m68k.c:2453
msgid "unknown/incorrect operand"
msgstr ""
-#: config/tc-m68k.c:2476 config/tc-m68k.c:2484 config/tc-m68k.c:2491
-#: config/tc-m68k.c:2498
+#: config/tc-m68k.c:2486 config/tc-m68k.c:2494 config/tc-m68k.c:2501
+#: config/tc-m68k.c:2508
msgid "out of range"
msgstr ""
-#: config/tc-m68k.c:2548
+#: config/tc-m68k.c:2558
msgid "Can't use long branches on 68000/68010/5200"
msgstr ""
-#: config/tc-m68k.c:2658
+#: config/tc-m68k.c:2668
msgid "Expression out of range, using 0"
msgstr ""
-#: config/tc-m68k.c:2770 config/tc-m68k.c:2786
+#: config/tc-m68k.c:2780 config/tc-m68k.c:2796
msgid "Floating point register in register list"
msgstr ""
-#: config/tc-m68k.c:2776
+#: config/tc-m68k.c:2786
msgid "Wrong register in floating-point reglist"
msgstr ""
-#: config/tc-m68k.c:2792
+#: config/tc-m68k.c:2802
msgid "incorrect register in reglist"
msgstr ""
-#: config/tc-m68k.c:2798
+#: config/tc-m68k.c:2808
msgid "wrong register in floating-point reglist"
msgstr ""
-#: config/tc-m68k.c:2874
+#: config/tc-m68k.c:2884
msgid "failed sanity check"
msgstr ""
#. ERROR
-#: config/tc-m68k.c:3239
+#: config/tc-m68k.c:3249
msgid "Extra )"
msgstr ""
#. ERROR
-#: config/tc-m68k.c:3250
+#: config/tc-m68k.c:3260
msgid "Missing )"
msgstr ""
-#: config/tc-m68k.c:3267
+#: config/tc-m68k.c:3277
msgid "Missing operand"
msgstr ""
-#: config/tc-m68k.c:3599
+#: config/tc-m68k.c:3609
#, c-format
msgid "%s -- statement `%s' ignored"
msgstr ""
-#: config/tc-m68k.c:3643
+#: config/tc-m68k.c:3653
#, c-format
msgid "Don't know how to figure width of %c in md_assemble()"
msgstr ""
-#: config/tc-m68k.c:3811 config/tc-m68k.c:3849
+#: config/tc-m68k.c:3821 config/tc-m68k.c:3859
#, c-format
msgid "Internal Error: Can't find %s in hash table"
msgstr ""
-#: config/tc-m68k.c:3814 config/tc-m68k.c:3852
+#: config/tc-m68k.c:3824 config/tc-m68k.c:3862
#, c-format
msgid "Internal Error: Can't hash %s: %s"
msgstr ""
-#: config/tc-m68k.c:3980
+#: config/tc-m68k.c:3990
#, c-format
msgid "unrecognized default cpu `%s' ???"
msgstr ""
-#: config/tc-m68k.c:3992
+#: config/tc-m68k.c:4002
msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly"
msgstr ""
-#: config/tc-m68k.c:4012
+#: config/tc-m68k.c:4022
msgid "options for 68881 and no-68881 both given"
msgstr ""
-#: config/tc-m68k.c:4014
+#: config/tc-m68k.c:4024
msgid "options for 68851 and no-68851 both given"
msgstr ""
-#: config/tc-m68k.c:4085
+#: config/tc-m68k.c:4095
#, c-format
msgid "text label `%s' aligned to odd boundary"
msgstr ""
-#: config/tc-m68k.c:4302
+#: config/tc-m68k.c:4312
msgid "invalid byte branch offset"
msgstr ""
-#: config/tc-m68k.c:4360
+#: config/tc-m68k.c:4370
msgid "short branch with zero offset: use :w"
msgstr ""
-#: config/tc-m68k.c:4896 config/tc-m68k.c:4907
+#: config/tc-m68k.c:4905 config/tc-m68k.c:4916
msgid "expression out of range: defaulting to 1"
msgstr ""
-#: config/tc-m68k.c:4939
+#: config/tc-m68k.c:4948
msgid "expression out of range: defaulting to 0"
msgstr ""
-#: config/tc-m68k.c:4972 config/tc-m68k.c:4984
+#: config/tc-m68k.c:4981 config/tc-m68k.c:4993
#, c-format
msgid "Can't deal with expression; defaulting to %ld"
msgstr ""
-#: config/tc-m68k.c:4998
+#: config/tc-m68k.c:5007
msgid "expression doesn't fit in BYTE"
msgstr ""
-#: config/tc-m68k.c:5002
+#: config/tc-m68k.c:5011
msgid "expression doesn't fit in WORD"
msgstr ""
-#: config/tc-m68k.c:5095
+#: config/tc-m68k.c:5104
#, c-format
msgid "%s: unrecognized processor name"
msgstr ""
-#: config/tc-m68k.c:5160
+#: config/tc-m68k.c:5169
msgid "bad coprocessor id"
msgstr ""
-#: config/tc-m68k.c:5166
+#: config/tc-m68k.c:5175
msgid "unrecognized fopt option"
msgstr ""
-#: config/tc-m68k.c:5300
+#: config/tc-m68k.c:5309
#, c-format
msgid "option `%s' may not be negated"
msgstr ""
-#: config/tc-m68k.c:5311
+#: config/tc-m68k.c:5320
#, c-format
msgid "option `%s' not recognized"
msgstr ""
-#: config/tc-m68k.c:5344
+#: config/tc-m68k.c:5353
msgid "bad format of OPT NEST=depth"
msgstr ""
-#: config/tc-m68k.c:5407
+#: config/tc-m68k.c:5416
msgid "missing label"
msgstr ""
-#: config/tc-m68k.c:5431 config/tc-m68k.c:5460
+#: config/tc-m68k.c:5440 config/tc-m68k.c:5469
msgid "bad register list"
msgstr ""
-#: config/tc-m68k.c:5433
+#: config/tc-m68k.c:5442
#, c-format
msgid "bad register list: %s"
msgstr ""
-#: config/tc-m68k.c:5531
+#: config/tc-m68k.c:5540
msgid "restore without save"
msgstr ""
-#: config/tc-m68k.c:5708 config/tc-m68k.c:6057
+#: config/tc-m68k.c:5717 config/tc-m68k.c:6066
msgid "syntax error in structured control directive"
msgstr ""
-#: config/tc-m68k.c:5759
+#: config/tc-m68k.c:5768
msgid "missing condition code in structured control directive"
msgstr ""
-#: config/tc-m68k.c:6091
+#: config/tc-m68k.c:6100
msgid "missing then"
msgstr ""
-#: config/tc-m68k.c:6173
+#: config/tc-m68k.c:6182
msgid "else without matching if"
msgstr ""
-#: config/tc-m68k.c:6207
+#: config/tc-m68k.c:6216
msgid "endi without matching if"
msgstr ""
-#: config/tc-m68k.c:6248
+#: config/tc-m68k.c:6257
msgid "break outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6287
+#: config/tc-m68k.c:6296
msgid "next outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6339
+#: config/tc-m68k.c:6348
msgid "missing ="
msgstr ""
-#: config/tc-m68k.c:6377
+#: config/tc-m68k.c:6386
msgid "missing to or downto"
msgstr ""
-#: config/tc-m68k.c:6413 config/tc-m68k.c:6447 config/tc-m68k.c:6657
+#: config/tc-m68k.c:6422 config/tc-m68k.c:6456 config/tc-m68k.c:6666
msgid "missing do"
msgstr ""
-#: config/tc-m68k.c:6550
+#: config/tc-m68k.c:6559
msgid "endf without for"
msgstr ""
-#: config/tc-m68k.c:6606
+#: config/tc-m68k.c:6615
msgid "until without repeat"
msgstr ""
-#: config/tc-m68k.c:6693
+#: config/tc-m68k.c:6702
msgid "endw without while"
msgstr ""
-#: config/tc-m68k.c:6817
+#: config/tc-m68k.c:6826
#, c-format
msgid "unrecognized option `%s'"
msgstr ""
-#: config/tc-m68k.c:6862
+#: config/tc-m68k.c:6871
#, c-format
msgid "unrecognized architecture specification `%s'"
msgstr ""
-#: config/tc-m68k.c:6932
+#: config/tc-m68k.c:6941
msgid ""
"680X0 options:\n"
"-l\t\t\tuse 1 word for refs to undefined symbols [default 2]\n"
@@ -4860,7 +4870,7 @@ msgid ""
"\t\t\t[default yes for 68020, 68030, and cpu32]\n"
msgstr ""
-#: config/tc-m68k.c:6942
+#: config/tc-m68k.c:6951
msgid ""
"-m68851 | -mno-68851\n"
"\t\t\ttarget has/lacks memory-management unit coprocessor\n"
@@ -4873,7 +4883,7 @@ msgid ""
"--bitwise-or\t\tdo not treat `|' as a comment character\n"
msgstr ""
-#: config/tc-m68k.c:6952
+#: config/tc-m68k.c:6961
msgid ""
"--base-size-default-16\tbase reg without size is 16 bits\n"
"--base-size-default-32\tbase reg without size is 32 bits (default)\n"
@@ -4881,12 +4891,12 @@ msgid ""
"--disp-size-default-32\tdisplacement with unknown size is 32 bits (default)\n"
msgstr ""
-#: config/tc-m68k.c:6987
+#: config/tc-m68k.c:6996
#, c-format
msgid "Error %s in %s\n"
msgstr ""
-#: config/tc-m68k.c:6991
+#: config/tc-m68k.c:7000
#, c-format
msgid "Opcode(%d.%s): "
msgstr ""
@@ -5174,7 +5184,7 @@ msgstr ""
msgid "pc-relative"
msgstr ""
-#: config/tc-mcore.c:2419 config/tc-pj.c:569 config/tc-sh.c:3326
+#: config/tc-mcore.c:2419 config/tc-pj.c:569 config/tc-sh.c:3331
#, c-format
msgid "Cannot represent relocation type %s"
msgstr ""
@@ -5727,13 +5737,13 @@ msgid ""
msgstr ""
#: config/tc-mn10200.c:807 config/tc-mn10300.c:953 config/tc-ppc.c:1736
-#: config/tc-v850.c:1728
+#: config/tc-s390.c:1161 config/tc-v850.c:1728
#, c-format
msgid "Unrecognized opcode: `%s'"
msgstr ""
#: config/tc-mn10200.c:1050 config/tc-mn10300.c:1476 config/tc-ppc.c:2097
-#: config/tc-v850.c:2152
+#: config/tc-s390.c:1091 config/tc-v850.c:2152
#, c-format
msgid "junk at end of line: `%s'"
msgstr ""
@@ -5946,12 +5956,12 @@ msgid ""
"-big\t\t\tgenerate big endian code\n"
msgstr ""
-#: config/tc-pj.c:458 config/tc-sh.c:2899 config/tc-sh.c:2906
-#: config/tc-sh.c:2913 config/tc-sh.c:2920
+#: config/tc-pj.c:458 config/tc-sh.c:2904 config/tc-sh.c:2911
+#: config/tc-sh.c:2918 config/tc-sh.c:2925
msgid "pcrel too far"
msgstr ""
-#: config/tc-pj.c:526 config/tc-sh.c:3011
+#: config/tc-pj.c:526 config/tc-sh.c:3016
msgid "offset out of range"
msgstr ""
@@ -5963,7 +5973,7 @@ msgstr ""
msgid "estimate size\n"
msgstr ""
-#: config/tc-ppc.c:926
+#: config/tc-ppc.c:926 config/tc-s390.c:356
#, c-format
msgid "invalid switch -m%s"
msgstr ""
@@ -6008,7 +6018,7 @@ msgstr ""
msgid "Neither Power nor PowerPC opcodes were selected."
msgstr ""
-#: config/tc-ppc.c:1117
+#: config/tc-ppc.c:1117 config/tc-s390.c:442
#, c-format
msgid "Internal assembler error for instruction %s"
msgstr ""
@@ -6022,7 +6032,7 @@ msgstr ""
msgid "identifier+constant@got means identifier@got+constant"
msgstr ""
-#: config/tc-ppc.c:1400 config/tc-sh.c:341 config/tc-sh.c:369
+#: config/tc-ppc.c:1400 config/tc-sh.c:346 config/tc-sh.c:374
#, c-format
msgid "%s relocations do not fit in %d bytes\n"
msgstr ""
@@ -6171,141 +6181,226 @@ msgstr ""
msgid "warning: symbol %s has no csect"
msgstr ""
-#: config/tc-ppc.c:4662
+#: config/tc-ppc.c:4661
msgid "symbol in .toc does not match any .tc"
msgstr ""
-#: config/tc-ppc.c:4956 config/tc-v850.c:2431
+#: config/tc-ppc.c:4955 config/tc-s390.c:1592 config/tc-v850.c:2431
msgid "unresolved expression that must be resolved"
msgstr ""
-#: config/tc-ppc.c:4959
+#: config/tc-ppc.c:4958 config/tc-s390.c:1595
msgid "unsupported relocation type"
msgstr ""
-#: config/tc-ppc.c:5021
+#: config/tc-ppc.c:5020
#, c-format
msgid "cannot emit PC relative %s relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5026
+#: config/tc-ppc.c:5025
#, c-format
msgid "cannot emit PC relative %s relocation"
msgstr ""
-#: config/tc-ppc.c:5088
+#: config/tc-ppc.c:5087
msgid "must branch to an address a multiple of 4"
msgstr ""
-#: config/tc-ppc.c:5092
+#: config/tc-ppc.c:5091
#, c-format
msgid "@local or @plt branch destination is too far away, %ld bytes"
msgstr ""
-#: config/tc-ppc.c:5116
+#: config/tc-ppc.c:5115
#, c-format
msgid "Gas failure, reloc value %d\n"
msgstr ""
-#: config/tc-sh.c:878
+#: config/tc-s390.c:395
+msgid ""
+" S390 options:\n"
+" -mregnames \tAllow symbolic names for registers\n"
+" -mno-regnames\tDo not allow symbolic names for registers\n"
+msgstr ""
+
+#: config/tc-s390.c:399
+msgid ""
+" -V \tprint assembler version number\n"
+" -Qy, -Qn \tignored\n"
+msgstr ""
+
+#: config/tc-s390.c:428
+#, c-format
+msgid "Internal assembler error for instruction format %s"
+msgstr ""
+
+#: config/tc-s390.c:604
+#, c-format
+msgid "identifier+constant@%s means identifier@%s+constant"
+msgstr ""
+
+#: config/tc-s390.c:683
+msgid "Can't handle O_big in s390_exp_compare"
+msgstr ""
+
+#: config/tc-s390.c:764
+msgid "Invalid suffix for literal pool entry"
+msgstr ""
+
+#: config/tc-s390.c:805
+msgid "Big number is too big"
+msgstr ""
+
+#: config/tc-s390.c:881 config/tc-s390.c:1330
+#, c-format
+msgid "%s relocations do not fit in %d bytes"
+msgstr ""
+
+#: config/tc-s390.c:888
+msgid "relocation not applicable"
+msgstr ""
+
+#: config/tc-s390.c:1010
+msgid "invalid operand suffix"
+msgstr ""
+
+#: config/tc-s390.c:1031
+msgid "syntax error; missing '(' after displacement"
+msgstr ""
+
+#: config/tc-s390.c:1040 config/tc-s390.c:1064 config/tc-s390.c:1078
+msgid "syntax error; expected ,"
+msgstr ""
+
+#: config/tc-s390.c:1059
+msgid "syntax error; missing ')' after base register"
+msgstr ""
+
+#: config/tc-s390.c:1072
+msgid "syntax error; ')' not allowed here"
+msgstr ""
+
+#: config/tc-s390.c:1222 config/tc-s390.c:1239 config/tc-s390.c:1248
+msgid "Invalid .insn format\n"
+msgstr ""
+
+#: config/tc-s390.c:1229
+#, c-format
+msgid "Unrecognized opcode format: `%s'"
+msgstr ""
+
+#: config/tc-s390.c:1250
+msgid "second operand of .insn not a constant\n"
+msgstr ""
+
+#: config/tc-s390.c:1252
+msgid "missing comma after insn constant\n"
+msgstr ""
+
+#: config/tc-s390.c:1521
+msgid "unresolved fx_subsy symbol that must be resolved"
+msgstr ""
+
+#: config/tc-sh.c:883
msgid "illegal register after @-"
msgstr ""
-#: config/tc-sh.c:894
+#: config/tc-sh.c:899
msgid "must be @(r0,...)"
msgstr ""
-#: config/tc-sh.c:910
+#: config/tc-sh.c:915
msgid "syntax error in @(r0,...)"
msgstr ""
-#: config/tc-sh.c:943 config/tc-sh.c:948
+#: config/tc-sh.c:948 config/tc-sh.c:953
msgid "syntax error in @(disp,[Rn, gbr, pc])"
msgstr ""
-#: config/tc-sh.c:953
+#: config/tc-sh.c:958
msgid "expecting )"
msgstr ""
-#: config/tc-sh.c:962
+#: config/tc-sh.c:967
msgid "illegal register after @"
msgstr ""
-#: config/tc-sh.c:1523
+#: config/tc-sh.c:1528
#, c-format
msgid "Invalid register: 'r%d'"
msgstr ""
-#: config/tc-sh.c:1686
+#: config/tc-sh.c:1691
msgid "insn can't be combined with parallel processing insn"
msgstr ""
-#: config/tc-sh.c:1693 config/tc-sh.c:1704
+#: config/tc-sh.c:1698 config/tc-sh.c:1709
msgid "multiple movx specifications"
msgstr ""
-#: config/tc-sh.c:1698 config/tc-sh.c:1725
+#: config/tc-sh.c:1703 config/tc-sh.c:1730
msgid "multiple movy specifications"
msgstr ""
-#: config/tc-sh.c:1706
+#: config/tc-sh.c:1711
msgid "invalid movx address register"
msgstr ""
-#: config/tc-sh.c:1712 config/tc-sh.c:1717
+#: config/tc-sh.c:1717 config/tc-sh.c:1722
msgid "invalid movx dsp register"
msgstr ""
-#: config/tc-sh.c:1734 config/tc-sh.c:1739
+#: config/tc-sh.c:1739 config/tc-sh.c:1744
msgid "invalid movy dsp register"
msgstr ""
-#: config/tc-sh.c:1743
+#: config/tc-sh.c:1748
msgid "invalid movy address register"
msgstr ""
-#: config/tc-sh.c:1749
+#: config/tc-sh.c:1754
msgid "dsp immediate shift value not constant"
msgstr ""
-#: config/tc-sh.c:1756 config/tc-sh.c:1769
+#: config/tc-sh.c:1761 config/tc-sh.c:1774
msgid "multiple parallel processing specifications"
msgstr ""
-#: config/tc-sh.c:1762
+#: config/tc-sh.c:1767
msgid "multiple condition specifications"
msgstr ""
-#: config/tc-sh.c:1778
+#: config/tc-sh.c:1783
msgid "insn cannot be combined with pmuls"
msgstr ""
-#: config/tc-sh.c:1795
+#: config/tc-sh.c:1800
msgid "bad padd / psub pmuls output operand"
msgstr ""
-#: config/tc-sh.c:1805
+#: config/tc-sh.c:1810
msgid "condition not followed by conditionalizable insn"
msgstr ""
-#: config/tc-sh.c:1815
+#: config/tc-sh.c:1820
msgid "unrecognized characters at end of parallel processing insn"
msgstr ""
-#: config/tc-sh.c:1931
+#: config/tc-sh.c:1936
#, c-format
msgid "excess operands: '%s'"
msgstr ""
-#: config/tc-sh.c:2099
+#: config/tc-sh.c:2104
msgid ".uses pseudo-op seen when not relaxing"
msgstr ""
-#: config/tc-sh.c:2105
+#: config/tc-sh.c:2110
msgid "bad .uses format"
msgstr ""
-#: config/tc-sh.c:2166
+#: config/tc-sh.c:2171
msgid ""
"SH options:\n"
"-little\t\t\tgenerate little endian code\n"
@@ -6314,61 +6409,61 @@ msgid ""
"-dsp\t\t\tenable sh-dsp insns, and disable sh3e / sh4 insns.\n"
msgstr ""
-#: config/tc-sh.c:2177 config/tc-w65.c:862
+#: config/tc-sh.c:2182 config/tc-w65.c:862
msgid "call to tc_Nout_fix_to_chars \n"
msgstr ""
-#: config/tc-sh.c:2261
+#: config/tc-sh.c:2266
msgid ".uses does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:2280
+#: config/tc-sh.c:2285
msgid "can't find fixup pointed to by .uses"
msgstr ""
-#: config/tc-sh.c:2303
+#: config/tc-sh.c:2308
msgid ".uses target does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:2401
+#: config/tc-sh.c:2406
msgid "displacement overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2404
+#: config/tc-sh.c:2409
#, c-format
msgid "displacement to defined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2408
+#: config/tc-sh.c:2413
#, c-format
msgid "displacement to undefined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2486
+#: config/tc-sh.c:2491
msgid "displacement overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:2489
+#: config/tc-sh.c:2494
#, c-format
msgid "displacement to defined symbol %s overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:2493
+#: config/tc-sh.c:2498
#, c-format
msgid "displacement to undefined symbol %s overflows 8-bit field "
msgstr ""
-#: config/tc-sh.c:2506
+#: config/tc-sh.c:2511
#, c-format
msgid "overflow in branch to %s; converted into longer instruction sequence"
msgstr ""
-#: config/tc-sh.c:2581 config/tc-sh.c:2629 config/tc-sparc.c:4084
+#: config/tc-sh.c:2586 config/tc-sh.c:2634 config/tc-sparc.c:4084
#: config/tc-sparc.c:4109
msgid "misaligned data"
msgstr ""
-#: config/tc-sh.c:3003
+#: config/tc-sh.c:3008
msgid "misaligned offset"
msgstr ""
@@ -6390,6 +6485,11 @@ msgstr ""
msgid "invalid architecture -A%s"
msgstr ""
+#: config/tc-sparc.c:548
+#, c-format
+msgid "No compiled in support for %d bit object file format"
+msgstr ""
+
#: config/tc-sparc.c:585
msgid "Unrecognized option following -K"
msgstr ""
@@ -7908,8 +8008,8 @@ msgstr ""
msgid "Unassigned file number %ld"
msgstr ""
-#: dwarf2dbg.c:1255 dwarf2dbg.c:1263 dwarf2dbg.c:1271 dwarf2dbg.c:1284
-#: dwarf2dbg.c:1291
+#: dwarf2dbg.c:1258 dwarf2dbg.c:1266 dwarf2dbg.c:1274 dwarf2dbg.c:1287
+#: dwarf2dbg.c:1294
msgid "dwarf2 is not supported for this object file format"
msgstr ""
@@ -8665,34 +8765,34 @@ msgstr ""
msgid "Error: "
msgstr ""
-#: messages.c:413 messages.c:429
+#: messages.c:413 messages.c:433
msgid "Fatal error: "
msgstr ""
-#: messages.c:446
+#: messages.c:450
msgid "Internal error!\n"
msgstr ""
-#: messages.c:448
+#: messages.c:452
#, c-format
msgid "Assertion failure in %s at %s line %d.\n"
msgstr ""
-#: messages.c:451
+#: messages.c:455
#, c-format
msgid "Assertion failure at %s line %d.\n"
msgstr ""
-#: messages.c:452 messages.c:471
+#: messages.c:456 messages.c:475
msgid "Please report this bug.\n"
msgstr ""
-#: messages.c:466
+#: messages.c:470
#, c-format
msgid "Internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: messages.c:469
+#: messages.c:473
#, c-format
msgid "Internal error, aborting at %s line %d\n"
msgstr ""
diff --git a/include/ChangeLog b/include/ChangeLog
index 39085a1..fa7af4b 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * dis-asm.h: Add linux target for S/390.
+
2001-01-11 Peter Targett <peter.targett@arccores.com>
* dis-asm.h (arc_get_disassembler): Correct declaration.
diff --git a/include/dis-asm.h b/include/dis-asm.h
index 5c9d8d8..6e3e3b5 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -206,6 +206,7 @@ extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
extern void print_arm_disassembler_options PARAMS ((FILE *));
extern void parse_arm_disassembler_option PARAMS ((char *));
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 05e73b8..ec399f1 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * common.h: Add linux target for S/390.
+ * s390.h: New file.
+
2001-01-11 Peter Targett <peter.targett@arccores.com>
* arc.h (E_ARC_MACH_ARC5, E_ARC_MACH_ARC6, E_ARC_MACH_ARC7,
diff --git a/include/elf/common.h b/include/elf/common.h
index d127b9c..991e57e 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -114,6 +114,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_960 19 /* Intel 80960 */
#define EM_PPC 20 /* PowerPC */
#define EM_PPC64 21 /* 64-bit PowerPC */
+#define EM_S390 22 /* IBM S/390 */
#define EM_V800 36 /* NEC V800 series */
#define EM_FR20 37 /* Fujitsu FR20 */
@@ -195,6 +196,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Alpha backend magic number. Written in the absence of an ABI. */
#define EM_ALPHA 0x9026
+/* old S/390 backend magic number. Written in the absence of an ABI. */
+#define EM_S390_OLD 0xa390
+
/* D10V backend magic number. Written in the absence of an ABI. */
#define EM_CYGNUS_D10V 0x7650
diff --git a/include/elf/s390.h b/include/elf/s390.h
new file mode 100644
index 0000000..3cd9976
--- /dev/null
+++ b/include/elf/s390.h
@@ -0,0 +1,73 @@
+/* 390 ELF support for BFD.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Carl B. Pedersen and Martin Schwidefsky.
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef _ELF_390_H
+#define _ELF_390_H
+
+/* Processor specific flags for the ELF header e_flags field. */
+
+/* Symbol types. */
+
+#define STACK_REG 15 /* Global Stack reg */
+#define BACKL_REG 14 /* Global Backlink reg */
+#define BASE_REG 13 /* Global Base reg */
+#define GOT_REG 12 /* Holds addr of GOT */
+
+#include "elf/reloc-macros.h"
+
+/* Relocation types. */
+
+START_RELOC_NUMBERS (elf_s390_reloc_type)
+ RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */
+ RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */
+ RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */
+ RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */
+ RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */
+ RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */
+ RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */
+ RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */
+ RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */
+ RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */
+ RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
+ RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
+ RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
+ RELOC_NUMBER (R_390_GOTOFF, 13) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
+ RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
+ RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
+ RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */
+ RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */
+ RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */
+ RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */
+ RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */
+ RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */
+ RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */
+ RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
+ RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
+ RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
+ RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
+END_RELOC_NUMBERS (R_390_max)
+
+#endif /* _ELF_390_H */
+
+
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 9dfdcd3..6e3d09f 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,7 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: New file.
+
2001-02-02 Patrick Macdonald <patrickm@redhat.com>
* cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
diff --git a/include/opcode/s390.h b/include/opcode/s390.h
new file mode 100644
index 0000000..8a7c00e
--- /dev/null
+++ b/include/opcode/s390.h
@@ -0,0 +1,130 @@
+/* s390.h -- Header file for S390 opcode table
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of BFD, the Binary File Descriptor library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef S390_H
+#define S390_H
+
+/* List of instruction sets variations. */
+
+enum s390_opcode_arch_val
+ {
+ S390_OPCODE_ESA = 0,
+ S390_OPCODE_ESAME
+ };
+
+/* The opcode table is an array of struct s390_opcode. */
+
+struct s390_opcode
+ {
+ /* The opcode name. */
+ const char * name;
+
+ /* The opcode itself. Those bits which will be filled in with
+ operands are zeroes. */
+ unsigned char opcode[6];
+
+ /* The opcode mask. This is used by the disassembler. This is a
+ mask containing ones indicating those bits which must match the
+ opcode field, and zeroes indicating those bits which need not
+ match (and are presumably filled in by operands). */
+ unsigned char mask[6];
+
+ /* The opcode length in bytes. */
+ int oplen;
+
+ /* An array of operand codes. Each code is an index into the
+ operand table. They appear in the order which the operands must
+ appear in assembly code, and are terminated by a zero. */
+ unsigned char operands[6];
+
+ /* Bitmask of architectures this opcode is available for. */
+ unsigned int architecture;
+ };
+
+/* The table itself is sorted by major opcode number, and is otherwise
+ in the order in which the disassembler should consider
+ instructions. */
+extern const struct s390_opcode s390_opcodes[];
+extern const int s390_num_opcodes;
+
+/* A opcode format table for the .insn pseudo mnemonic. */
+extern const struct s390_opcode s390_opformats[];
+extern const int s390_num_opformats;
+
+/* Values defined for the flags field of a struct powerpc_opcode. */
+
+/* The operands table is an array of struct s390_operand. */
+
+struct s390_operand
+ {
+ /* The number of bits in the operand. */
+ int bits;
+
+ /* How far the operand is left shifted in the instruction. */
+ int shift;
+
+ /* One bit syntax flags. */
+ unsigned long flags;
+ };
+
+/* Elements in the table are retrieved by indexing with values from
+ the operands field of the powerpc_opcodes table. */
+
+extern const struct s390_operand s390_operands[];
+
+/* Values defined for the flags field of a struct s390_operand. */
+
+/* This operand names a register. The disassembler uses this to print
+ register names with a leading 'r'. */
+#define S390_OPERAND_GPR 0x1
+
+/* This operand names a floating point register. The disassembler
+ prints these with a leading 'f'. */
+#define S390_OPERAND_FPR 0x2
+
+/* This operand names an access register. The disassembler
+ prints these with a leading 'a'. */
+#define S390_OPERAND_AR 0x4
+
+/* This operand names a control register. The disassembler
+ prints these with a leading 'c'. */
+#define S390_OPERAND_CR 0x8
+
+/* This operand is a displacement. */
+#define S390_OPERAND_DISP 0x10
+
+/* This operand names a base register. */
+#define S390_OPERAND_BASE 0x20
+
+/* This operand names an index register, it can be skipped. */
+#define S390_OPERAND_INDEX 0x40
+
+/* This operand is a relative branch displacement. The disassembler
+ prints these symbolically if possible. */
+#define S390_OPERAND_PCREL 0x80
+
+/* This operand takes signed values. */
+#define S390_OPERAND_SIGNED 0x100
+
+/* This operand is a length. */
+#define S390_OPERAND_LENGTH 0x200
+
+#endif /* S390_H */
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 946b2b5..5bc32ff 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * Makefile.in: Likewise.
+ * configure.host: Likewise.
+ * configure.tgt: Likewise.
+ * emulparams/elf64_s390.sh: New file.
+ * emulparams/elf_s390.sh: New file.
+
2001-02-09 Jakub Jelinek <jakub@redhat.com>
* configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 1a72278..daa9761 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -153,6 +153,7 @@ ALL_EMULATIONS = \
eelf_i386.o \
eelf_i386_be.o \
eelf_i386_chaos.o \
+ eelf_s390.o \
egld960.o \
egld960coff.o \
eh8300.o \
@@ -242,6 +243,7 @@ ALL_EMULATIONS = \
ALL_64_EMULATIONS = \
eelf64_ia64.o \
eelf_x86_64.o \
+ eelf64_s390.o \
eelf64_sparc.o \
eelf64alpha.o \
eelf64bmip.o \
@@ -486,6 +488,9 @@ eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
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_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
@@ -504,6 +509,9 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
+eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960 "$(tdir_gld960)"
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 862cad6..64a910f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -261,6 +261,7 @@ ALL_EMULATIONS = \
eelf_i386.o \
eelf_i386_be.o \
eelf_i386_chaos.o \
+ eelf_s390.o \
egld960.o \
egld960coff.o \
eh8300.o \
@@ -351,6 +352,7 @@ ALL_EMULATIONS = \
ALL_64_EMULATIONS = \
eelf64_ia64.o \
eelf_x86_64.o \
+ eelf64_s390.o \
eelf64_sparc.o \
eelf64alpha.o \
eelf64bmip.o \
@@ -458,7 +460,7 @@ deffilep.c ldgram.c ldlex.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
OBJECTS = $(ld_new_OBJECTS)
@@ -1200,6 +1202,9 @@ eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
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_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
@@ -1218,6 +1223,9 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
+eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960 "$(tdir_gld960)"
diff --git a/ld/configure.host b/ld/configure.host
index be14e01..ed09cfe 100644
--- a/ld/configure.host
+++ b/ld/configure.host
@@ -206,6 +206,16 @@ romp-*-*)
HDEFINES=-DNO_VARARGS
;;
+s390x-*-linux)
+ HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
+ ;;
+
+s390-*-linux)
+ HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else gcc --print-file-name=crtbegin.o; fi`'
+ HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else gcc -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else gcc --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
+ ;;
+
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`'
diff --git a/ld/configure.tgt b/ld/configure.tgt
index ee6a230..d569eff 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -316,6 +316,8 @@ fr30-*-*) targ_emul=elf32fr30 ;;
mcore-*-pe) targ_emul=mcorepe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mcore-*-elf) targ_emul=elf32mcore ;;
+s390x-*-linux*) targ_emul=elf64_s390 ;;
+s390-*-linux*) targ_emul=elf_s390 ;;
*-*-ieee*) targ_emul=vanilla ;;
*)
diff --git a/ld/emulparams/elf64_s390.sh b/ld/emulparams/elf64_s390.sh
new file mode 100644
index 0000000..1ba223e
--- /dev/null
+++ b/ld/emulparams/elf64_s390.sh
@@ -0,0 +1,11 @@
+SCRIPT_NAME=elf
+ELFSIZE=64
+OUTPUT_FORMAT="elf64-s390"
+TEXT_START_ADDR=0x80000000
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x80000000
+ARCH="s390:esame"
+MACHINE=
+NOP=0x0707
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/elf_s390.sh b/ld/emulparams/elf_s390.sh
new file mode 100644
index 0000000..6fa3836
--- /dev/null
+++ b/ld/emulparams/elf_s390.sh
@@ -0,0 +1,10 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-s390"
+TEXT_START_ADDR=0x00400000
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x00400000
+ARCH=s390
+MACHINE=
+NOP=0x0707
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/po/ld.pot b/ld/po/ld.pot
index 584dca5..bdd5798 100644
--- a/ld/po/ld.pot
+++ b/ld/po/ld.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-12-26 12:54-0800\n"
+"POT-Creation-Date: 2001-02-06 18:03-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -250,7 +250,7 @@ msgstr ""
msgid "Errors encountered processing file %s for interworking"
msgstr ""
-#: emultempl/pe.em:1094 ldlang.c:1981 ldlang.c:4347 ldlang.c:4380
+#: emultempl/pe.em:1094 ldlang.c:1994 ldlang.c:4363 ldlang.c:4396
#: ldmain.c:1016
msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
msgstr ""
@@ -457,200 +457,200 @@ msgstr ""
msgid "%P%F: cannot represent machine `%s'\n"
msgstr ""
-#: ldlang.c:736
+#: ldlang.c:749
msgid ""
"\n"
"Memory Configuration\n"
"\n"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:751
msgid "Name"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:751
msgid "Origin"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:751
msgid "Length"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:751
msgid "Attributes"
msgstr ""
-#: ldlang.c:780
+#: ldlang.c:793
msgid ""
"\n"
"Linker script and memory map\n"
"\n"
msgstr ""
-#: ldlang.c:797
+#: ldlang.c:810
msgid "%P%F: Illegal use of `%s' section"
msgstr ""
-#: ldlang.c:807
+#: ldlang.c:820
msgid "%P%F: output format %s cannot represent section called %s\n"
msgstr ""
-#: ldlang.c:969
+#: ldlang.c:982
msgid "%P: %B: warning: ignoring duplicate section `%s'\n"
msgstr ""
-#: ldlang.c:972
+#: ldlang.c:985
msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"
msgstr ""
-#: ldlang.c:986
+#: ldlang.c:999
msgid "%P: %B: warning: duplicate section `%s' has different size\n"
msgstr ""
-#: ldlang.c:1037
+#: ldlang.c:1050
msgid "%P%F: Failed to create hash table\n"
msgstr ""
-#: ldlang.c:1427
+#: ldlang.c:1440
msgid "%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1428
+#: ldlang.c:1441
msgid "%B: matching formats:"
msgstr ""
-#: ldlang.c:1435
+#: ldlang.c:1448
msgid "%F%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1488
+#: ldlang.c:1501
msgid "%F%B: object %B in archive is not object\n"
msgstr ""
-#: ldlang.c:1494 ldlang.c:1506
+#: ldlang.c:1507 ldlang.c:1519
msgid "%F%B: could not read symbols: %E\n"
msgstr ""
-#: ldlang.c:1766
+#: ldlang.c:1779
msgid ""
"%P: warning: could not find any targets that match endianness requirement\n"
msgstr ""
-#: ldlang.c:1779
+#: ldlang.c:1792
msgid "%P%F: target %s not found\n"
msgstr ""
-#: ldlang.c:1781
+#: ldlang.c:1794
msgid "%P%F: cannot open output file %s: %E\n"
msgstr ""
-#: ldlang.c:1791
+#: ldlang.c:1804
msgid "%P%F:%s: can not make object file: %E\n"
msgstr ""
-#: ldlang.c:1795
+#: ldlang.c:1808
msgid "%P%F:%s: can not set architecture: %E\n"
msgstr ""
-#: ldlang.c:1799
+#: ldlang.c:1812
msgid "%P%F: can not create link hash table: %E\n"
msgstr ""
-#: ldlang.c:2104
+#: ldlang.c:2117
msgid " load address 0x%V"
msgstr ""
-#: ldlang.c:2234
+#: ldlang.c:2247
msgid "%W (size before relaxing)\n"
msgstr ""
-#: ldlang.c:2316
+#: ldlang.c:2329
#, c-format
msgid "Address of section %s set to "
msgstr ""
-#: ldlang.c:2465
+#: ldlang.c:2478
#, c-format
msgid "Fail with %d\n"
msgstr ""
-#: ldlang.c:2703
+#: ldlang.c:2716
msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
msgstr ""
-#: ldlang.c:2737
+#: ldlang.c:2750
msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
msgstr ""
-#: ldlang.c:2745
+#: ldlang.c:2758
msgid "%X%P: region %s is full (%B section %s)\n"
msgstr ""
-#: ldlang.c:2794
+#: ldlang.c:2807
msgid "%P%X: Internal error on COFF shared library section %s\n"
msgstr ""
-#: ldlang.c:2835
+#: ldlang.c:2848
msgid "%P: warning: no memory region specified for section `%s'\n"
msgstr ""
-#: ldlang.c:2848
+#: ldlang.c:2861
msgid "%P: warning: changing start of section %s by %u bytes\n"
msgstr ""
-#: ldlang.c:2862
+#: ldlang.c:2875
msgid "%F%S: non constant address expression for section %s\n"
msgstr ""
-#: ldlang.c:2927
+#: ldlang.c:2940
msgid "%X%P: use an absolute load address or a load memory region, not both\n"
msgstr ""
-#: ldlang.c:3043
+#: ldlang.c:3056
msgid "%P%F: can't relax section: %E\n"
msgstr ""
-#: ldlang.c:3210
+#: ldlang.c:3223
msgid "%F%P: invalid data statement\n"
msgstr ""
-#: ldlang.c:3247
+#: ldlang.c:3260
msgid "%F%P: invalid reloc statement\n"
msgstr ""
-#: ldlang.c:3383
+#: ldlang.c:3396
msgid "%P%F:%s: can't set start address\n"
msgstr ""
-#: ldlang.c:3396 ldlang.c:3413
+#: ldlang.c:3409 ldlang.c:3426
msgid "%P%F: can't set start address\n"
msgstr ""
-#: ldlang.c:3408
+#: ldlang.c:3421
msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
msgstr ""
-#: ldlang.c:3418
+#: ldlang.c:3431
msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
msgstr ""
-#: ldlang.c:3460
+#: ldlang.c:3473
msgid ""
"%P: warning: %s architecture of input file `%B' is incompatible with %s "
"output\n"
msgstr ""
-#: ldlang.c:3478
+#: ldlang.c:3494
msgid "%E%X: failed to merge target specific data of file %B\n"
msgstr ""
-#: ldlang.c:3565
+#: ldlang.c:3581
msgid ""
"\n"
"Allocating common symbols\n"
msgstr ""
-#: ldlang.c:3566
+#: ldlang.c:3582
msgid ""
"Common symbol size file\n"
"\n"
@@ -659,43 +659,43 @@ msgstr ""
#. This message happens when using the
#. svr3.ifile linker script, so I have
#. disabled it.
-#: ldlang.c:3648
+#: ldlang.c:3664
msgid "%P: no [COMMON] command, defaulting to .bss\n"
msgstr ""
-#: ldlang.c:3707
+#: ldlang.c:3723
msgid "%P%F: invalid syntax in flags\n"
msgstr ""
-#: ldlang.c:4296
+#: ldlang.c:4312
msgid "%P%Fmultiple STARTUP files\n"
msgstr ""
-#: ldlang.c:4566
+#: ldlang.c:4582
msgid "%F%P: bfd_record_phdr failed: %E\n"
msgstr ""
-#: ldlang.c:4585
+#: ldlang.c:4601
msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
msgstr ""
-#: ldlang.c:4893
+#: ldlang.c:4916
msgid "%X%P: unknown language `%s' in version information\n"
msgstr ""
-#: ldlang.c:4942
+#: ldlang.c:4965
msgid "%X%P: duplicate version tag `%s'\n"
msgstr ""
-#: ldlang.c:4955 ldlang.c:4968
+#: ldlang.c:4978 ldlang.c:4991
msgid "%X%P: duplicate expression `%s' in version information\n"
msgstr ""
-#: ldlang.c:5005
+#: ldlang.c:5028
msgid "%X%P: unable to find version dependency `%s'\n"
msgstr ""
-#: ldlang.c:5027
+#: ldlang.c:5050
msgid "%X%P: unable to read .exports section contents"
msgstr ""
@@ -940,7 +940,7 @@ msgstr ""
msgid "GNU ld version %s (with BFD %s)\n"
msgstr ""
-#: ldver.c:46 lexsup.c:961
+#: ldver.c:46 lexsup.c:996
msgid " Supported emulations:\n"
msgstr ""
@@ -961,559 +961,568 @@ msgstr ""
msgid "%F%P: final link failed: %E\n"
msgstr ""
-#: lexsup.c:159 lexsup.c:250
+#: lexsup.c:169 lexsup.c:260
msgid "KEYWORD"
msgstr ""
-#: lexsup.c:159
+#: lexsup.c:169
msgid "Shared library control for HP/UX compatibility"
msgstr ""
-#: lexsup.c:162
+#: lexsup.c:172
msgid "ARCH"
msgstr ""
-#: lexsup.c:162
+#: lexsup.c:172
msgid "Set architecture"
msgstr ""
-#: lexsup.c:164 lexsup.c:315
+#: lexsup.c:174 lexsup.c:325
msgid "TARGET"
msgstr ""
-#: lexsup.c:164
+#: lexsup.c:174
msgid "Specify target for following input files"
msgstr ""
-#: lexsup.c:166 lexsup.c:205 lexsup.c:217 lexsup.c:226 lexsup.c:297
-#: lexsup.c:322 lexsup.c:360
+#: lexsup.c:176 lexsup.c:215 lexsup.c:227 lexsup.c:236 lexsup.c:307
+#: lexsup.c:332 lexsup.c:370
msgid "FILE"
msgstr ""
-#: lexsup.c:166
+#: lexsup.c:176
msgid "Read MRI format linker script"
msgstr ""
-#: lexsup.c:168
+#: lexsup.c:178
msgid "Force common symbols to be defined"
msgstr ""
-#: lexsup.c:172 lexsup.c:350 lexsup.c:352 lexsup.c:354
+#: lexsup.c:182 lexsup.c:360 lexsup.c:362 lexsup.c:364
msgid "ADDRESS"
msgstr ""
-#: lexsup.c:172
+#: lexsup.c:182
msgid "Set start address"
msgstr ""
-#: lexsup.c:174
+#: lexsup.c:184
msgid "Export all dynamic symbols"
msgstr ""
-#: lexsup.c:176
+#: lexsup.c:186
msgid "Link big-endian objects"
msgstr ""
-#: lexsup.c:178
+#: lexsup.c:188
msgid "Link little-endian objects"
msgstr ""
-#: lexsup.c:180 lexsup.c:183
+#: lexsup.c:190 lexsup.c:193
msgid "SHLIB"
msgstr ""
-#: lexsup.c:180
+#: lexsup.c:190
msgid "Auxiliary filter for shared object symbol table"
msgstr ""
-#: lexsup.c:183
+#: lexsup.c:193
msgid "Filter for shared object symbol table"
msgstr ""
-#: lexsup.c:185
+#: lexsup.c:195
msgid "Ignored"
msgstr ""
-#: lexsup.c:187
+#: lexsup.c:197
msgid "SIZE"
msgstr ""
-#: lexsup.c:187
+#: lexsup.c:197
msgid "Small data size (if no size, same as --shared)"
msgstr ""
-#: lexsup.c:190
+#: lexsup.c:200
msgid "FILENAME"
msgstr ""
-#: lexsup.c:190
+#: lexsup.c:200
msgid "Set internal name of shared library"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:202
msgid "LIBNAME"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:202
msgid "Search for library LIBNAME"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:204
msgid "DIRECTORY"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:204
msgid "Add DIRECTORY to library search path"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:206
msgid "EMULATION"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:206
msgid "Set emulation"
msgstr ""
-#: lexsup.c:198
+#: lexsup.c:208
msgid "Print map file on standard output"
msgstr ""
-#: lexsup.c:200
+#: lexsup.c:210
msgid "Do not page align data"
msgstr ""
-#: lexsup.c:202
+#: lexsup.c:212
msgid "Do not page align data, do not make text readonly"
msgstr ""
-#: lexsup.c:205
+#: lexsup.c:215
msgid "Set output file name"
msgstr ""
-#: lexsup.c:207
+#: lexsup.c:217
msgid "Optimize output file"
msgstr ""
-#: lexsup.c:209
+#: lexsup.c:219
msgid "Ignored for SVR4 compatibility"
msgstr ""
-#: lexsup.c:213
+#: lexsup.c:223
msgid "Generate relocateable output"
msgstr ""
-#: lexsup.c:217
+#: lexsup.c:227
msgid "Just link symbols (if directory, same as --rpath)"
msgstr ""
-#: lexsup.c:220
+#: lexsup.c:230
msgid "Strip all symbols"
msgstr ""
-#: lexsup.c:222
+#: lexsup.c:232
msgid "Strip debugging symbols"
msgstr ""
-#: lexsup.c:224
+#: lexsup.c:234
msgid "Trace file opens"
msgstr ""
-#: lexsup.c:226
+#: lexsup.c:236
msgid "Read linker script"
msgstr ""
-#: lexsup.c:228 lexsup.c:242 lexsup.c:283 lexsup.c:295 lexsup.c:344
-#: lexsup.c:363 lexsup.c:380
+#: lexsup.c:238 lexsup.c:252 lexsup.c:293 lexsup.c:305 lexsup.c:354
+#: lexsup.c:373 lexsup.c:390
msgid "SYMBOL"
msgstr ""
-#: lexsup.c:228
+#: lexsup.c:238
msgid "Start with undefined reference to SYMBOL"
msgstr ""
-#: lexsup.c:230
-msgid "Don't merge orphan sections with the same name"
+#: lexsup.c:240
+msgid "[=SECTION]"
msgstr ""
-#: lexsup.c:232
+#: lexsup.c:240
+msgid "Don't merge input [SECTION | orphan] sections"
+msgstr ""
+
+#: lexsup.c:242
msgid "Build global constructor/destructor tables"
msgstr ""
-#: lexsup.c:234
+#: lexsup.c:244
msgid "Print version information"
msgstr ""
-#: lexsup.c:236
+#: lexsup.c:246
msgid "Print version and emulation information"
msgstr ""
-#: lexsup.c:238
+#: lexsup.c:248
msgid "Discard all local symbols"
msgstr ""
-#: lexsup.c:240
+#: lexsup.c:250
msgid "Discard temporary local symbols"
msgstr ""
-#: lexsup.c:242
+#: lexsup.c:252
msgid "Trace mentions of SYMBOL"
msgstr ""
-#: lexsup.c:244 lexsup.c:324 lexsup.c:326
+#: lexsup.c:254 lexsup.c:334 lexsup.c:336
msgid "PATH"
msgstr ""
-#: lexsup.c:244
+#: lexsup.c:254
msgid "Default search path for Solaris compatibility"
msgstr ""
-#: lexsup.c:246
+#: lexsup.c:256
msgid "Start a group"
msgstr ""
-#: lexsup.c:248
+#: lexsup.c:258
msgid "End a group"
msgstr ""
-#: lexsup.c:250
+#: lexsup.c:260
msgid "Ignored for SunOS compatibility"
msgstr ""
-#: lexsup.c:252
+#: lexsup.c:262
msgid "Link against shared libraries"
msgstr ""
-#: lexsup.c:258
+#: lexsup.c:268
msgid "Do not link against shared libraries"
msgstr ""
-#: lexsup.c:266
+#: lexsup.c:276
msgid "Bind global references locally"
msgstr ""
-#: lexsup.c:268
+#: lexsup.c:278
msgid "Check section addresses for overlaps (default)"
msgstr ""
-#: lexsup.c:270
+#: lexsup.c:280
msgid "Do not check section addresses for overlaps"
msgstr ""
-#: lexsup.c:273
+#: lexsup.c:283
msgid "Output cross reference table"
msgstr ""
-#: lexsup.c:275
+#: lexsup.c:285
msgid "SYMBOL=EXPRESSION"
msgstr ""
-#: lexsup.c:275
+#: lexsup.c:285
msgid "Define a symbol"
msgstr ""
-#: lexsup.c:277
+#: lexsup.c:287
msgid "[=STYLE]"
msgstr ""
-#: lexsup.c:277
+#: lexsup.c:287
msgid "Demangle symbol names [using STYLE]"
msgstr ""
-#: lexsup.c:279
+#: lexsup.c:289
msgid "PROGRAM"
msgstr ""
-#: lexsup.c:279
+#: lexsup.c:289
msgid "Set the dynamic linker to use"
msgstr ""
-#: lexsup.c:281
+#: lexsup.c:291
msgid "Generate embedded relocs"
msgstr ""
-#: lexsup.c:283
+#: lexsup.c:293
msgid "Call SYMBOL at unload-time"
msgstr ""
-#: lexsup.c:285
+#: lexsup.c:295
msgid "Force generation of file with .exe suffix"
msgstr ""
-#: lexsup.c:287
+#: lexsup.c:297
msgid "Remove unused sections (on some targets)"
msgstr ""
-#: lexsup.c:290
+#: lexsup.c:300
msgid "Don't remove unused sections (default)"
msgstr ""
-#: lexsup.c:293
+#: lexsup.c:303
msgid "Print option help"
msgstr ""
-#: lexsup.c:295
+#: lexsup.c:305
msgid "Call SYMBOL at load-time"
msgstr ""
-#: lexsup.c:297
+#: lexsup.c:307
msgid "Write a map file"
msgstr ""
-#: lexsup.c:299
+#: lexsup.c:309
msgid "Do not demangle symbol names"
msgstr ""
-#: lexsup.c:301
+#: lexsup.c:311
msgid "Use less memory and more disk I/O"
msgstr ""
-#: lexsup.c:303
+#: lexsup.c:313
msgid "Allow no undefined symbols"
msgstr ""
-#: lexsup.c:305
+#: lexsup.c:315
msgid "Allow undefined symbols in shared objects"
msgstr ""
-#: lexsup.c:307
+#: lexsup.c:317
msgid "Don't warn about mismatched input files"
msgstr ""
-#: lexsup.c:309
+#: lexsup.c:319
msgid "Turn off --whole-archive"
msgstr ""
-#: lexsup.c:311
+#: lexsup.c:321
msgid "Create an output file even if errors occur"
msgstr ""
-#: lexsup.c:315
+#: lexsup.c:325
msgid "Specify target of output file"
msgstr ""
-#: lexsup.c:317
+#: lexsup.c:327
msgid "Ignored for Linux compatibility"
msgstr ""
-#: lexsup.c:319
+#: lexsup.c:329
msgid "Relax branches on certain targets"
msgstr ""
-#: lexsup.c:322
+#: lexsup.c:332
msgid "Keep only symbols listed in FILE"
msgstr ""
-#: lexsup.c:324
+#: lexsup.c:334
msgid "Set runtime shared library search path"
msgstr ""
-#: lexsup.c:326
+#: lexsup.c:336
msgid "Set link time shared library search path"
msgstr ""
-#: lexsup.c:328
+#: lexsup.c:338
msgid "Create a shared library"
msgstr ""
-#: lexsup.c:332
+#: lexsup.c:342
msgid "Sort common symbols by size"
msgstr ""
-#: lexsup.c:336
+#: lexsup.c:346
msgid "[=SIZE]"
msgstr ""
-#: lexsup.c:336
+#: lexsup.c:346
msgid "Split output sections every SIZE octets"
msgstr ""
-#: lexsup.c:338
+#: lexsup.c:348
msgid "[=COUNT]"
msgstr ""
-#: lexsup.c:338
+#: lexsup.c:348
msgid "Split output sections every COUNT relocs"
msgstr ""
-#: lexsup.c:340
+#: lexsup.c:350
msgid "Print memory usage statistics"
msgstr ""
-#: lexsup.c:342
+#: lexsup.c:352
msgid "Display target specific options"
msgstr ""
-#: lexsup.c:344
+#: lexsup.c:354
msgid "Do task level linking"
msgstr ""
-#: lexsup.c:346
+#: lexsup.c:356
msgid "Use same format as native linker"
msgstr ""
-#: lexsup.c:348
+#: lexsup.c:358
msgid "SECTION=ADDRESS"
msgstr ""
-#: lexsup.c:348
+#: lexsup.c:358
msgid "Set address of named section"
msgstr ""
-#: lexsup.c:350
+#: lexsup.c:360
msgid "Set address of .bss section"
msgstr ""
-#: lexsup.c:352
+#: lexsup.c:362
msgid "Set address of .data section"
msgstr ""
-#: lexsup.c:354
+#: lexsup.c:364
msgid "Set address of .text section"
msgstr ""
-#: lexsup.c:356
+#: lexsup.c:366
msgid "Output lots of information during link"
msgstr ""
-#: lexsup.c:360
+#: lexsup.c:370
msgid "Read version information script"
msgstr ""
-#: lexsup.c:363
+#: lexsup.c:373
msgid ""
"Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."
msgstr ""
-#: lexsup.c:366
+#: lexsup.c:376
msgid "Warn about duplicate common symbols"
msgstr ""
-#: lexsup.c:368
+#: lexsup.c:378
msgid "Warn if global constructors/destructors are seen"
msgstr ""
-#: lexsup.c:371
+#: lexsup.c:381
msgid "Warn if the multiple GP values are used"
msgstr ""
-#: lexsup.c:373
+#: lexsup.c:383
msgid "Warn only once per undefined symbol"
msgstr ""
-#: lexsup.c:375
+#: lexsup.c:385
msgid "Warn if start of section changes due to alignment"
msgstr ""
-#: lexsup.c:378
+#: lexsup.c:388
msgid "Include all objects from following archives"
msgstr ""
-#: lexsup.c:380
+#: lexsup.c:390
msgid "Use wrapper functions for SYMBOL"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:392
msgid "[=WORDS]"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:392
msgid ""
"Modify problematic branches in last WORDS (1-10,\n"
"\t\t\t\tdefault 5) words of a page"
msgstr ""
-#: lexsup.c:532
+#: lexsup.c:560
+#, c-format
+msgid "%s: unrecognized option '%s'\n"
+msgstr ""
+
+#: lexsup.c:564
#, c-format
msgid "%s: use the --help option for usage information\n"
msgstr ""
-#: lexsup.c:552
+#: lexsup.c:584
msgid "%P%F: unrecognized -a option `%s'\n"
msgstr ""
-#: lexsup.c:565
+#: lexsup.c:597
msgid "%P%F: unrecognized -assert option `%s'\n"
msgstr ""
-#: lexsup.c:608
+#: lexsup.c:640
msgid "%F%P: unknown demangling style `%s'"
msgstr ""
-#: lexsup.c:667
+#: lexsup.c:699
msgid "%P%F: invalid number `%s'\n"
msgstr ""
-#: lexsup.c:845
+#: lexsup.c:877
msgid "%P%F: -shared not supported\n"
msgstr ""
-#: lexsup.c:879
+#: lexsup.c:911
#, c-format
msgid "%s: Invalid argument to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:890
+#: lexsup.c:922
#, c-format
msgid "%s: Missing argument(s) to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:954
-msgid "Copyright 2000 Free Software Foundation, Inc.\n"
+#: lexsup.c:989
+msgid "Copyright 2001 Free Software Foundation, Inc.\n"
msgstr ""
-#: lexsup.c:955
+#: lexsup.c:990
msgid ""
"This program is free software; you may redistribute it under the terms of\n"
"the GNU General Public License. This program has absolutely no warranty.\n"
msgstr ""
-#: lexsup.c:1047
+#: lexsup.c:1082
#, c-format
msgid "%s: may not nest groups (--help for usage)\n"
msgstr ""
-#: lexsup.c:1058
+#: lexsup.c:1093
#, c-format
msgid "%s: group ended before it began (--help for usage)\n"
msgstr ""
-#: lexsup.c:1075
+#: lexsup.c:1110
#, c-format
msgid "%s: Invalid argument to option \"mpc860c0\"\n"
msgstr ""
-#: lexsup.c:1131
+#: lexsup.c:1166
msgid "%P%F: invalid hex number `%s'\n"
msgstr ""
-#: lexsup.c:1143
+#: lexsup.c:1178
#, c-format
msgid "Usage: %s [options] file...\n"
msgstr ""
-#: lexsup.c:1145
+#: lexsup.c:1180
msgid "Options:\n"
msgstr ""
#. Note: Various tools (such as libtool) depend upon the
#. format of the listings below - do not change them.
-#: lexsup.c:1224
+#: lexsup.c:1263
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: lexsup.c:1232
+#: lexsup.c:1271
#, c-format
msgid "%s: supported emulations: "
msgstr ""
-#: lexsup.c:1237
+#: lexsup.c:1276
#, c-format
msgid "%s: emulation specific options:\n"
msgstr ""
-#: lexsup.c:1241
+#: lexsup.c:1280
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index fac33a6..4194447 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,14 @@
+2001-02-09 Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * Makefile.in: Likewise.
+ * configure.in: Likewise.
+ * disassemble.c: Likewise.
+ * s390-dis.c: New file.
+ * s390-mkopc.c: New file.
+ * s390-opc.c: New file.
+ * s390-opc.txt: New file.
+
2001-02-05 Jim Wilson <wilson@redhat.com>
* ia64-asmtab.c: Revert 2000-12-16 change.
diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
index e31d9c1..b1cbabf 100644
--- a/opcodes/Makefile.am
+++ b/opcodes/Makefile.am
@@ -101,6 +101,8 @@ CFILES = \
pj-opc.c \
ppc-dis.c \
ppc-opc.c \
+ s390-opc.c \
+ s390-dis.c \
sh-dis.c \
sparc-dis.c \
sparc-opc.c \
@@ -173,6 +175,8 @@ ALL_MACHINES = \
ppc-dis.lo \
ppc-opc.lo \
ns32k-dis.lo \
+ s390-dis.lo \
+ s390-opc.lo \
sh-dis.lo \
sparc-dis.lo \
sparc-opc.lo \
@@ -489,6 +493,10 @@ 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
+s390-dis.lo: s390-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/s390.h
+s390-opc.lo: s390-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/s390.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 \
diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in
index e406027..cd166b0 100644
--- a/opcodes/Makefile.in
+++ b/opcodes/Makefile.in
@@ -212,6 +212,8 @@ CFILES = \
pj-opc.c \
ppc-dis.c \
ppc-opc.c \
+ s390-opc.c \
+ s390-dis.c \
sh-dis.c \
sparc-dis.c \
sparc-opc.c \
@@ -285,6 +287,8 @@ ALL_MACHINES = \
ppc-dis.lo \
ppc-opc.lo \
ns32k-dis.lo \
+ s390-dis.lo \
+ s390-opc.lo \
sh-dis.lo \
sparc-dis.lo \
sparc-opc.lo \
@@ -999,6 +1003,10 @@ 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
+s390-dis.lo: s390-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/s390.h
+s390-opc.lo: s390-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/s390.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 \
diff --git a/opcodes/configure b/opcodes/configure
index 426a70e..7d63895 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -4545,9 +4545,10 @@ if test x${all_targets} = xfalse ; then
bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
+ bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
- bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
+ bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
bfd_sh_arch)
ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
diff --git a/opcodes/configure.in b/opcodes/configure.in
index b0d4288..34b947a 100644
--- a/opcodes/configure.in
+++ b/opcodes/configure.in
@@ -199,9 +199,10 @@ if test x${all_targets} = xfalse ; then
bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
+ bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
- bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
+ bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
bfd_sh_arch)
ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index d031840..ce3b6ad 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_pj
#define ARCH_powerpc
#define ARCH_rs6000
+#define ARCH_s390
#define ARCH_sh
#define ARCH_sparc
#define ARCH_tic30
@@ -245,6 +246,11 @@ disassembler (abfd)
disassemble = print_insn_rs6000;
break;
#endif
+#ifdef ARCH_s390
+ case bfd_arch_s390:
+ disassemble = print_insn_s390;
+ break;
+#endif
#ifdef ARCH_sh
case bfd_arch_sh:
if (bfd_big_endian (abfd))
diff --git a/opcodes/po/POTFILES.in b/opcodes/po/POTFILES.in
index b30cbd5..2beea2a 100644
--- a/opcodes/po/POTFILES.in
+++ b/opcodes/po/POTFILES.in
@@ -73,6 +73,8 @@ pj-dis.c
pj-opc.c
ppc-dis.c
ppc-opc.c
+s390-dis.c
+s390-opc.c
sh-dis.c
sh-opc.h
sparc-dis.c
diff --git a/opcodes/po/opcodes.pot b/opcodes/po/opcodes.pot
index 3336bbd..944647a 100644
--- a/opcodes/po/opcodes.pot
+++ b/opcodes/po/opcodes.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-11 12:44-0800\n"
+"POT-Creation-Date: 2001-02-09 16:04-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -186,7 +186,7 @@ msgstr ""
msgid "%02x\t\t*unknown*"
msgstr ""
-#: i386-dis.c:2740
+#: i386-dis.c:2741
msgid "<internal disassembler error>"
msgstr ""
diff --git a/opcodes/s390-dis.c b/opcodes/s390-dis.c
new file mode 100644
index 0000000..6409d5f
--- /dev/null
+++ b/opcodes/s390-dis.c
@@ -0,0 +1,231 @@
+/* s390-dis.c -- Disassemble S390 instructions
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of GDB, GAS and the GNU binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include <stdio.h>
+#include "ansidecl.h"
+#include "sysdep.h"
+#include "dis-asm.h"
+#include "opcode/s390.h"
+
+static int init_flag = 0;
+static int opc_index[256];
+static int current_arch_mask = 0;
+
+/* Set up index table for first opcode byte */
+static void
+init_disasm(info)
+ struct disassemble_info *info ATTRIBUTE_UNUSED;
+{
+ const struct s390_opcode *opcode;
+ const struct s390_opcode *opcode_end;
+
+ memset(opc_index, 0, sizeof(opc_index));
+ opcode_end = s390_opcodes + s390_num_opcodes;
+ for (opcode = s390_opcodes; opcode < opcode_end; opcode++) {
+ opc_index[(int) opcode->opcode[0]] = opcode - s390_opcodes;
+ while ((opcode < opcode_end) &&
+ (opcode[1].opcode[0] == opcode->opcode[0]))
+ opcode++;
+ }
+ switch (info->mach) {
+ case bfd_mach_s390_esa:
+ current_arch_mask = 1 << S390_OPCODE_ESA;
+ break;
+ case bfd_mach_s390_esame:
+ current_arch_mask = 1 << S390_OPCODE_ESAME;
+ break;
+ default:
+ abort();
+ }
+ init_flag = 1;
+}
+
+/* Extracts an operand value from an instruction. */
+
+static inline unsigned int
+s390_extract_operand (insn, operand)
+ unsigned char *insn;
+ const struct s390_operand *operand;
+{
+ unsigned int val;
+ int bits;
+
+ /* extract fragments of the operand byte for byte */
+ insn += operand->shift/8;
+ bits = (operand->shift & 7) + operand->bits;
+ val = 0;
+ do {
+ val <<= 8;
+ val |= (unsigned int) *insn++;
+ bits -= 8;
+ } while (bits > 0);
+ val >>= -bits;
+ val &= ((1U << (operand->bits-1))<<1) - 1;
+
+ /* sign extend value if the operand is signed or pc relative */
+ if ((operand->flags & (S390_OPERAND_SIGNED|S390_OPERAND_PCREL)) &&
+ (val & (1U << (operand->bits-1))))
+ val |= (-1U << (operand->bits-1))<<1;
+
+ /* double value if the operand is pc relative */
+ if (operand->flags & S390_OPERAND_PCREL)
+ val <<= 1;
+
+ /* length x in an instructions has real length x+1 */
+ if (operand->flags & S390_OPERAND_LENGTH)
+ val++;
+ return val;
+}
+
+/* Print a S390 instruction. */
+
+int
+print_insn_s390 (memaddr, info)
+ bfd_vma memaddr;
+ struct disassemble_info *info;
+{
+ bfd_byte buffer[6];
+ const struct s390_opcode *opcode;
+ const struct s390_opcode *opcode_end;
+ unsigned int value;
+ int status, opsize, bufsize;
+ char separator;
+
+ if (init_flag == 0)
+ init_disasm(info);
+
+ /* The output looks better if we put 6 bytes on a line. */
+ info->bytes_per_line = 6;
+
+ /* Every S390 instruction is max 6 bytes long. */
+ memset(buffer, 0, 6);
+ status = (*info->read_memory_func) (memaddr, buffer, 6, info);
+ if (status != 0) {
+ for (bufsize = 0; bufsize < 6; bufsize++)
+ if ((*info->read_memory_func) (memaddr, buffer, bufsize+1, info) != 0)
+ break;
+ if (bufsize <= 0) {
+ (*info->memory_error_func) (status, memaddr, info);
+ return -1;
+ }
+ /* Opsize calculation looks strange but it works
+ 00xxxxxx -> 2 bytes, 01xxxxxx/10xxxxxx -> 4 bytes,
+ 11xxxxxx -> 6 bytes. */
+ opsize = ((((buffer[0]>>6)+1)>>1)+1)<<1;
+ status = opsize > bufsize;
+ } else {
+ bufsize = 6;
+ opsize = ((((buffer[0]>>6)+1)>>1)+1)<<1;
+ }
+
+ if (status == 0) {
+ /* Find the first match in the opcode table. */
+ opcode_end = s390_opcodes + s390_num_opcodes;
+ for (opcode = s390_opcodes + opc_index[(int) buffer[0]];
+ (opcode < opcode_end) && (buffer[0] == opcode->opcode[0]);
+ opcode++) {
+ const struct s390_operand *operand;
+ const unsigned char *opindex;
+
+ /* check architecture */
+ if (!(opcode->architecture & current_arch_mask))
+ continue;
+ /* check signature of the opcode */
+ if ((buffer[1] & opcode->mask[1]) != opcode->opcode[1] ||
+ (buffer[2] & opcode->mask[2]) != opcode->opcode[2] ||
+ (buffer[3] & opcode->mask[3]) != opcode->opcode[3] ||
+ (buffer[4] & opcode->mask[4]) != opcode->opcode[4] ||
+ (buffer[5] & opcode->mask[5]) != opcode->opcode[5])
+ continue;
+
+ /* the instruction is valid */
+ if (opcode->operands[0] != 0)
+ (*info->fprintf_func) (info->stream, "%s\t", opcode->name);
+ else
+ (*info->fprintf_func) (info->stream, "%s", opcode->name);
+
+ /* Extract the operands. */
+ separator = 0;
+ for (opindex = opcode->operands; *opindex != 0; opindex++) {
+ unsigned int value;
+
+ operand = s390_operands + *opindex;
+ value = s390_extract_operand(buffer, operand);
+
+ if ((operand->flags & S390_OPERAND_INDEX) && value == 0)
+ continue;
+ if ((operand->flags & S390_OPERAND_BASE) &&
+ value == 0 && separator == '(') {
+ separator = ',';
+ continue;
+ }
+
+ if (separator)
+ (*info->fprintf_func) (info->stream, "%c", separator);
+
+ if (operand->flags & S390_OPERAND_GPR)
+ (*info->fprintf_func) (info->stream, "%%r%i", value);
+ else if (operand->flags & S390_OPERAND_FPR)
+ (*info->fprintf_func) (info->stream, "%%f%i", value);
+ else if (operand->flags & S390_OPERAND_AR)
+ (*info->fprintf_func) (info->stream, "%%a%i", value);
+ else if (operand->flags & S390_OPERAND_CR)
+ (*info->fprintf_func) (info->stream, "%%c%i", value);
+ else if (operand->flags & S390_OPERAND_PCREL)
+ (*info->print_address_func) (memaddr + (int) value, info);
+ else if (operand->flags & S390_OPERAND_SIGNED)
+ (*info->fprintf_func) (info->stream, "%i", (int) value);
+ else
+ (*info->fprintf_func) (info->stream, "%i", value);
+
+ if (operand->flags & S390_OPERAND_DISP) {
+ separator = '(';
+ } else if (operand->flags & S390_OPERAND_BASE) {
+ (*info->fprintf_func) (info->stream, ")");
+ separator = ',';
+ } else
+ separator = ',';
+ }
+
+ /* found instruction, printed it, return its size */
+ return opsize;
+ }
+ /* no matching instruction found, fall through to hex print */
+ }
+
+ if (bufsize >= 4) {
+ value = (unsigned int) buffer[0];
+ value = (value << 8) + (unsigned int) buffer[1];
+ value = (value << 8) + (unsigned int) buffer[2];
+ value = (value << 8) + (unsigned int) buffer[3];
+ (*info->fprintf_func) (info->stream,".long\t0x%08x", value);
+ return 4;
+ } else if (bufsize >= 2) {
+ value = (unsigned int) buffer[0];
+ value = (value << 8) + (unsigned int) buffer[1];
+ (*info->fprintf_func) (info->stream,".short\t0x%04x", value);
+ return 2;
+ } else {
+ value = (unsigned int) buffer[0];
+ (*info->fprintf_func) (info->stream,".byte\t0x%02x", value);
+ return 1;
+ }
+}
diff --git a/opcodes/s390-mkopc.c b/opcodes/s390-mkopc.c
new file mode 100644
index 0000000..c290dec
--- /dev/null
+++ b/opcodes/s390-mkopc.c
@@ -0,0 +1,172 @@
+/* s390-mkopc.c -- Generates opcode table out of s390-opc.txt
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of GDB, GAS, and the GNU binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* ARCHBITS_ESA and ARCH_ESAME correspond to the bit numbers defined
+ by s390_opcode_arch_val in include/opcode/s390.h:
+ ARCHBITS_ESAONLY = (1<<S390_OPCODE_ESA)
+ ARCHBITS_ESA = (1<<S390_OPCODE_ESA) + (1<<S390_OPCODE_ESAME)
+ ARCHBITS_ESA = (1<<S390_OPCODE_ESAME). */
+#define ARCHBITS_ESAONLY 1
+#define ARCHBITS_ESA 3
+#define ARCHBITS_ESAME 2
+
+struct op_struct {
+ char opcode[16];
+ char mnemonic[16];
+ char format[16];
+ int archbits;
+ unsigned long long sort_value;
+ int no_nibbles;
+};
+
+struct op_struct *op_array;
+int max_ops;
+int no_ops;
+
+static void
+createTable(void)
+{
+ max_ops = 256;
+ op_array = malloc(max_ops*sizeof(struct op_struct));
+ no_ops = 0;
+}
+
+/*
+ * `insertOpcode': insert an op_struct into sorted opcode array
+ */
+static void
+insertOpcode(char *opcode, char *mnemonic, char *format, int archbits)
+{
+ char *str;
+ unsigned long long sort_value;
+ int no_nibbles;
+ int ix, k;
+
+ while (no_ops >= max_ops) {
+ max_ops = max_ops*2;
+ op_array = realloc(op_array, max_ops*sizeof(struct op_struct));
+ }
+ sort_value = 0;
+ str = opcode;
+ for (ix = 0; ix < 16; ix++) {
+ if (*str >= '0' && *str <= '9')
+ sort_value = (sort_value << 4) + (*str - '0');
+ else if (*str >= 'a' && *str <= 'f')
+ sort_value = (sort_value << 4) + (*str - 'a' + 10);
+ else if (*str >= 'A' && *str <= 'F')
+ sort_value = (sort_value << 4) + (*str - 'A' + 10);
+ else if (*str == '?')
+ sort_value <<= 4;
+ else
+ break;
+ str++;
+ }
+ sort_value <<= 4*(16 - ix);
+ no_nibbles = ix;
+ for (ix = 0; ix < no_ops; ix++)
+ if (sort_value > op_array[ix].sort_value)
+ break;
+ for (k = no_ops; k > ix; k--)
+ op_array[k] = op_array[k-1];
+ strcpy(op_array[ix].opcode, opcode);
+ strcpy(op_array[ix].mnemonic, mnemonic);
+ strcpy(op_array[ix].format, format);
+ op_array[ix].sort_value = sort_value;
+ op_array[ix].no_nibbles = no_nibbles;
+ op_array[ix].archbits = archbits;
+ no_ops++;
+}
+
+
+/*
+ * `dumpTable': write opcode table
+ */
+static void
+dumpTable(void)
+{
+ char *str;
+ int ix;
+
+ /* Write hash table entries (slots). */
+ printf("const struct s390_opcode s390_opcodes[] = {\n");
+ for (ix = 0; ix < no_ops; ix++) {
+ printf(" { \"%s\", ", op_array[ix].mnemonic);
+ for (str = op_array[ix].opcode; *str != 0; str++)
+ if (*str == '?')
+ *str = '0';
+ printf("OP%i(0x%sLL), ",
+ op_array[ix].no_nibbles*4, op_array[ix].opcode);
+ printf("MASK_%s, INSTR_%s, ",
+ op_array[ix].format, op_array[ix].format);
+ printf("%i}", op_array[ix].archbits);
+ if (ix < no_ops-1)
+ printf(",\n");
+ else
+ printf("\n");
+ }
+ printf("};\n\n");
+ printf("const int s390_num_opcodes =\n");
+ printf(" sizeof (s390_opcodes) / sizeof (s390_opcodes[0]);\n\n");
+}
+
+
+int
+main(void)
+{
+ char currentLine[256];
+
+ createTable();
+ /* Read opcode descriptions from `stdin'. For each mnemonic,
+ * make an entry into the opcode table.
+ */
+ while (fgets(currentLine, sizeof(currentLine), stdin) != NULL) {
+ char opcode[16];
+ char mnemonic[16];
+ char format[16];
+ char description[64];
+ char archtag[16];
+ int archbits;
+
+ if (currentLine[0] == '#')
+ continue;
+ memset(opcode, 0, 8);
+ if (sscanf(currentLine, "%15s %15s %15s \"%[^\"]\" %15s",
+ opcode, mnemonic, format, description, archtag) == 5) {
+ if (strcmp(archtag, "esaonly") == 0)
+ archbits = ARCHBITS_ESAONLY;
+ else if (strcmp(archtag, "esa") == 0)
+ archbits = ARCHBITS_ESA;
+ else if (strcmp(archtag, "esame") == 0)
+ archbits = ARCHBITS_ESAME;
+ else
+ archbits = 0;
+ insertOpcode(opcode, mnemonic, format, archbits);
+ } else
+ fprintf(stderr, "Couldn't scan line %s\n", currentLine);
+ }
+
+ dumpTable();
+ return 0;
+}
diff --git a/opcodes/s390-opc.c b/opcodes/s390-opc.c
new file mode 100644
index 0000000..90fc2f7
--- /dev/null
+++ b/opcodes/s390-opc.c
@@ -0,0 +1,969 @@
+/* s390-opc.c -- S390 opcode list
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+
+ This file is part of GDB, GAS, and the GNU binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include <stdio.h>
+#include "ansidecl.h"
+#include "opcode/s390.h"
+
+/* This file holds the S390 opcode table. The opcode table
+ includes almost all of the extended instruction mnemonics. This
+ permits the disassembler to use them, and simplifies the assembler
+ logic, at the cost of increasing the table size. The table is
+ strictly constant data, so the compiler should be able to put it in
+ the .text section.
+
+ This file also holds the operand table. All knowledge about
+ inserting operands into instructions and vice-versa is kept in this
+ file. */
+
+/* The operands table.
+ The fields are bits, shift, insert, extract, flags. */
+
+const struct s390_operand s390_operands[] =
+{
+#define UNUSED 0
+ { 0, 0, 0 }, /* Indicates the end of the operand list */
+
+#define R_8 1 /* GPR starting at position 8 */
+ { 4, 8, S390_OPERAND_GPR },
+#define R_12 2 /* GPR starting at position 12 */
+ { 4, 12, S390_OPERAND_GPR },
+#define R_16 3 /* GPR starting at position 16 */
+ { 4, 16, S390_OPERAND_GPR },
+#define R_20 4 /* GPR starting at position 20 */
+ { 4, 20, S390_OPERAND_GPR },
+#define R_24 5 /* GPR starting at position 24 */
+ { 4, 24, S390_OPERAND_GPR },
+#define R_28 6 /* GPR starting at position 28 */
+ { 4, 28, S390_OPERAND_GPR },
+#define R_32 7 /* GPR starting at position 32 */
+ { 4, 32, S390_OPERAND_GPR },
+
+#define F_8 8 /* FPR starting at position 8 */
+ { 4, 8, S390_OPERAND_FPR },
+#define F_12 9 /* FPR starting at position 12 */
+ { 4, 12, S390_OPERAND_FPR },
+#define F_16 10 /* FPR starting at position 16 */
+ { 4, 16, S390_OPERAND_FPR },
+#define F_20 11 /* FPR starting at position 16 */
+ { 4, 16, S390_OPERAND_FPR },
+#define F_24 12 /* FPR starting at position 24 */
+ { 4, 24, S390_OPERAND_FPR },
+#define F_28 13 /* FPR starting at position 28 */
+ { 4, 28, S390_OPERAND_FPR },
+#define F_32 14 /* FPR starting at position 32 */
+ { 4, 32, S390_OPERAND_FPR },
+
+#define A_8 15 /* Access reg. starting at position 8 */
+ { 4, 8, S390_OPERAND_AR },
+#define A_12 16 /* Access reg. starting at position 12 */
+ { 4, 12, S390_OPERAND_AR },
+#define A_24 17 /* Access reg. starting at position 24 */
+ { 4, 24, S390_OPERAND_AR },
+#define A_28 18 /* Access reg. starting at position 28 */
+ { 4, 28, S390_OPERAND_AR },
+
+#define C_8 19 /* Control reg. starting at position 8 */
+ { 4, 8, S390_OPERAND_CR },
+#define C_12 20 /* Control reg. starting at position 12 */
+ { 4, 12, S390_OPERAND_CR },
+
+#define B_16 21 /* Base register starting at position 16 */
+ { 4, 16, S390_OPERAND_BASE|S390_OPERAND_GPR },
+#define B_32 22 /* Base register starting at position 32 */
+ { 4, 32, S390_OPERAND_BASE|S390_OPERAND_GPR },
+
+#define X_12 23 /* Index register starting at position 12 */
+ { 4, 12, S390_OPERAND_INDEX|S390_OPERAND_GPR },
+
+#define D_20 24 /* Displacement starting at position 20 */
+ { 12, 20, S390_OPERAND_DISP },
+#define D_36 25 /* Displacement starting at position 36 */
+ { 12, 36, S390_OPERAND_DISP },
+
+#define L4_8 26 /* 4 bit length starting at position 8 */
+ { 4, 8, S390_OPERAND_LENGTH },
+#define L4_12 27 /* 4 bit length starting at position 12 */
+ { 4, 12, S390_OPERAND_LENGTH },
+#define L8_8 28 /* 8 bit length starting at position 8 */
+ { 8, 8, S390_OPERAND_LENGTH },
+
+#define U4_8 29 /* 4 bit unsigned value starting at 8 */
+ { 4, 8, 0 },
+#define U4_12 30 /* 4 bit unsigned value starting at 12 */
+ { 4, 12, 0 },
+#define U4_16 31 /* 4 bit unsigned value starting at 16 */
+ { 4, 16, 0 },
+#define U4_20 32 /* 4 bit unsigned value starting at 20 */
+ { 4, 20, 0 },
+#define U8_8 33 /* 8 bit unsigned value starting at 8 */
+ { 8, 8, 0 },
+#define U8_16 34 /* 8 bit unsigned value starting at 16 */
+ { 8, 16, 0 },
+#define I16_16 35 /* 16 bit signed value starting at 16 */
+ { 16, 16, S390_OPERAND_SIGNED },
+#define U16_16 36 /* 16 bit unsigned value starting at 16 */
+ { 16, 16, 0 },
+#define J16_16 37 /* PC relative jump offset at 16 */
+ { 16, 16, S390_OPERAND_PCREL },
+#define J32_16 38 /* PC relative long offset at 16 */
+ { 32, 16, S390_OPERAND_PCREL }
+};
+
+
+/* Macros used to form opcodes. */
+
+/* 8/16/48 bit opcodes */
+#define OP8(x) { x, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define OP16(x) { x>>8, x&255, 0x00, 0x00, 0x00, 0x00 }
+#define OP48(x) { x>>40, (x>>32)&255, (x>>24)&255, \
+ (x>>16)&255, (x>>8)&255, x&255}
+
+#define INSTR_E 2, { 0,0,0,0,0,0 } /* e.g. pr */
+#define INSTR_RR 2, { R_8,R_12,0,0,0,0 } /* e.g. lr */
+#define INSTR_RR_M 2, { U4_8,R_12,0,0,0,0 } /* e.g. bcr */
+#define INSTR_RR_B 2, { R_12, 0,0,0,0,0 } /* e.g. br */
+#define INSTR_RR_I 2, { U8_8, 0,0,0,0,0 } /* e.g. svc */
+#define INSTR_RR_R 2, { R_8, 0,0,0,0,0 } /* e.g. spm */
+#define INSTR_RR_E 2, { R_8,R_12,0,0,0,0 } /* e.g. aer */
+#define INSTR_RR_D 2, { F_8,F_12,0,0,0,0 } /* e.g. adr */
+#define INSTR_RR_X 2, { R_8,R_12,0,0,0,0 } /* e.g. mxr */
+#define INSTR_RR_ED 2, { F_8,F_12,0,0,0,0 } /* e.g. mer */
+#define INSTR_RR_DE 2, { F_8,F_12,0,0,0,0 } /* e.g. lrer */
+#define INSTR_RR_DX 2, { F_8,F_12,0,0,0,0 } /* e.g. mxdr */
+#define INSTR_RR_XD 2, { F_8,F_12,0,0,0,0 } /* e.g. lrdr */
+#define INSTR_RRE 4, { R_24,R_28,0,0,0,0 } /* e.g. lura */
+#define INSTR_RRE_A 4, { A_24,A_28,0,0,0,0 } /* e.g. cpya */
+#define INSTR_RRE_F 4, { F_24,F_28,0,0,0,0 } /* e.g. debr */
+#define INSTR_RRE_O 4, { 0,0,0,0,0,0 } /* e.g. palb */
+#define INSTR_RRE_R 4, { R_24,0,0,0,0,0 } /* e.g. ipm */
+#define INSTR_RRE_R2 4, { R_28,0,0,0,0,0 } /* e.g. tb */
+#define INSTR_RRE_E 4, { F_24,0,0,0,0,0 } /* e.g. sqer */
+#define INSTR_RRE_D 4, { F_24,0,0,0,0,0 } /* e.g. sqdr */
+#define INSTR_RRE_X 4, { F_24,0,0,0,0,0 } /* e.g. dxr */
+#define INSTR_RRE_AR 4, { A_24,R_28,0,0,0,0 } /* e.g. sar */
+#define INSTR_RRE_RA 4, { R_24,A_28,0,0,0,0 } /* e.g. ear */
+#define INSTR_RRF_M 4, { R_24,U4_16,R_28,0,0,0 } /* e.g. cfxbr*/
+#define INSTR_RRF_RM 4, { R_24,R_16,R_28,U4_20,0,0 } /* e.g. didbr*/
+#define INSTR_RRF_R 4, { R_16,R_24,R_28,0,0,0 } /* e.g. madbr*/
+#define INSTR_RRF_F 4, { F_16,F_24,F_28,0,0,0 } /* e.g. madbr*/
+#define INSTR_RS 4, { R_8,R_12,D_20,B_16,0,0 } /* e.g. cs */
+#define INSTR_RS_A 4, { A_8,A_12,D_20,B_16,0,0 } /* e.g. lam */
+#define INSTR_RS_C 4, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lctl */
+#define INSTR_RS_M 4, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icm */
+#define INSTR_RS_S 4, { R_8,D_20,B_16,0,0,0 } /* e.g. sll */
+#define INSTR_RS_D 4, { R_8,D_20,B_16,0,0,0 } /* e.g. sldl */
+#define INSTR_RX 4, { R_8,D_20,X_12,B_16,0,0 } /* e.g. l */
+#define INSTR_RX_M 4, { U4_8,D_20,X_12,B_16,0,0 } /* e.g. bc */
+#define INSTR_RX_B 4, { D_20,X_12,B_16,0,0,0 } /* e.g. b */
+#define INSTR_RX_E 4, { F_8,D_20,X_12,B_16,0,0 } /* e.g. ae */
+#define INSTR_RX_D 4, { F_8,D_20,X_12,B_16,0,0 } /* e.g. ad */
+#define INSTR_RX_ED 4, { F_8,D_20,X_12,B_16,0,0 } /* e.g. me */
+#define INSTR_RX_DX 4, { F_8,D_20,X_12,B_16,0,0 } /* e.g. mxd */
+#define INSTR_RXE 6, { R_8,D_20,X_12,B_16,0,0 } /* e.g. agr */
+#define INSTR_RXE_F 6, { F_8,D_20,X_12,B_16,0,0 } /* e.g. axbr */
+#define INSTR_RXF 6, { F_32,D_20,X_12,B_16,F_8,0 } /* e.g. madb */
+#define INSTR_S 4, { D_20,B_16,0,0,0,0 } /* e.g. lpsw */
+#define INSTR_S_O 4, { 0,0,0,0,0,0 } /* e.g. hsch */
+#define INSTR_SI 4, { D_20,B_16,U8_8,0,0,0 } /* e.g. cli */
+#define INSTR_SS_RR 6, { D_20,R_8,B_16,D_36,B_32,R_12 } /* e.g. mvck */
+#define INSTR_SS_LL 6, { D_20,L4_8,B_16,D_36,L4_12,B_32 } /* e.g. pack */
+#define INSTR_SS_LI 6, { D_20,L4_8,B_16,D_36,B_32,U4_12 } /* e.g. srp */
+#define INSTR_SS_L 6, { D_20,L8_8,B_16,D_36,B_32,0 } /* e.g. mvc */
+#define INSTR_SS_LMD 6, { R_8,R_12,D_20,B_16,D_36,B_32 } /* e.g. lmd */
+#define INSTR_SS_PLO 6, { R_8,D_20,B_16,R_12,D_36,B_32 } /* e.g. plo */
+#define INSTR_SSE 6, { D_20,B_16,D_36,B_32,0,0 } /* e.g. mvsdk */
+#define INSTR_RI 4, { R_8,I16_16,0,0,0,0 } /* e.g. ahi */
+#define INSTR_RI_U 4, { R_8,U16_16,0,0,0,0 } /* e.g. tml */
+#define INSTR_RI_A 4, { R_8,J16_16,0,0,0,0 } /* e.g. brct */
+#define INSTR_RI_MA 4, { U4_8,J16_16,0,0,0 } /* e.g. brc */
+#define INSTR_RI_B 4, { J16_16,0,0,0,0 } /* e.g. j */
+#define INSTR_RSI_A 4, { R_8,R_12,J16_16,0,0,0 } /* e.g. brxh */
+#define INSTR_RSE 6, { R_8,D_20,B_16,R_12,0,0 } /* e.g. lmg */
+#define INSTR_RSE_M 6, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icmh */
+#define INSTR_RSE_R 6, { R_8,R_12,D_20,B_16,0,0 } /* e.g. lmh */
+#define INSTR_RIE_A 6, { R_8,J16_16,R_12,0,0,0 } /* e.g. brxhg */
+#define INSTR_RIL_A 6, { R_8,J32_16,0,0,0,0 } /* e.g. brasl */
+#define INSTR_RIL_B 6, { J32_16,0,0,0,0,0 } /* e.g. jg */
+#define INSTR_RIL_MA 6, { R_8,J32_16,0,0,0,0 } /* e.g. brcl */
+
+#define MASK_E { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_M { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_B { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_I { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_R { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_E { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_D { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_X { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_ED { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_DE { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_DX { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RR_XD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRE { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRE_A { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRE_F { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRE_O { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
+#define MASK_RRE_R { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
+#define MASK_RRE_R2 { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
+#define MASK_RRE_E { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
+#define MASK_RRE_D { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
+#define MASK_RRE_X { 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00 }
+#define MASK_RRE_AR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRE_RA { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRF_M { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRF_RM { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRF_R { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRF_F { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RS { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RS_A { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RS_C { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RS_M { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RS_S { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RS_D { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX_M { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX_B { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX_E { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX_D { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX_ED { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RX_DX { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RXE { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RXE_F { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RXF { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_S { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_S_O { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
+#define MASK_SI { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_RR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_LL { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_LI { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_L { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_LMD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_PLO { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SSE { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RI { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RI_U { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RI_A { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RI_MA { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RI_B { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RSI_A { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RSE { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSE_M { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RSE_R { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RIE_A { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
+#define MASK_RIL_A { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RIL_B { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RIL_M { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RIL_MA { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
+
+/* The opcode formats table (blueprints for .insn pseudo mnemonic). */
+
+const struct s390_opcode s390_opformats[] = {
+ { "e", OP8(0x00LL), MASK_E, INSTR_E, 3 },
+ { "ri", OP8(0x00LL), MASK_RI, INSTR_RI, 3 },
+ { "ri_a", OP8(0x00LL), MASK_RI_A, INSTR_RI_A, 3 },
+ { "ri_b", OP8(0x00LL), MASK_RI_B, INSTR_RI_B, 3 },
+ { "ri_ma", OP8(0x00LL), MASK_RI_MA, INSTR_RI_MA, 3 },
+ { "ri_u", OP8(0x00LL), MASK_RI_U, INSTR_RI_U, 3 },
+ { "rie_a", OP8(0x00LL), MASK_RIE_A, INSTR_RIE_A, 3 },
+ { "ril_a", OP8(0x00LL), MASK_RIL_A, INSTR_RIL_A, 3 },
+ { "ril_b", OP8(0x00LL), MASK_RIL_B, INSTR_RIL_B, 3 },
+ { "ril_ma", OP8(0x00LL), MASK_RIL_MA, INSTR_RIL_MA, 3 },
+ { "rr", OP8(0x00LL), MASK_RR, INSTR_RR, 3 },
+ { "rr_b", OP8(0x00LL), MASK_RR_B, INSTR_RR_B, 3 },
+ { "rr_d", OP8(0x00LL), MASK_RR_D, INSTR_RR_D, 3 },
+ { "rr_de", OP8(0x00LL), MASK_RR_DE, INSTR_RR_DE, 3 },
+ { "rr_dx", OP8(0x00LL), MASK_RR_DX, INSTR_RR_DX, 3 },
+ { "rr_e", OP8(0x00LL), MASK_RR_E, INSTR_RR_E, 3 },
+ { "rr_ed", OP8(0x00LL), MASK_RR_ED, INSTR_RR_ED, 3 },
+ { "rr_i", OP8(0x00LL), MASK_RR_I, INSTR_RR_I, 3 },
+ { "rr_m", OP8(0x00LL), MASK_RR_M, INSTR_RR_M, 3 },
+ { "rr_r", OP8(0x00LL), MASK_RR_R, INSTR_RR_R, 3 },
+ { "rr_x", OP8(0x00LL), MASK_RR_X, INSTR_RR_X, 3 },
+ { "rr_xd", OP8(0x00LL), MASK_RR_XD, INSTR_RR_XD, 3 },
+ { "rre", OP8(0x00LL), MASK_RRE, INSTR_RRE, 3 },
+ { "rre_a", OP8(0x00LL), MASK_RRE_A, INSTR_RRE_A, 3 },
+ { "rre_ar", OP8(0x00LL), MASK_RRE_AR, INSTR_RRE_AR, 3 },
+ { "rre_d", OP8(0x00LL), MASK_RRE_D, INSTR_RRE_D, 3 },
+ { "rre_e", OP8(0x00LL), MASK_RRE_E, INSTR_RRE_E, 3 },
+ { "rre_f", OP8(0x00LL), MASK_RRE_F, INSTR_RRE_F, 3 },
+ { "rre_o", OP8(0x00LL), MASK_RRE_O, INSTR_RRE_O, 3 },
+ { "rre_r", OP8(0x00LL), MASK_RRE_R, INSTR_RRE_R, 3 },
+ { "rre_r2", OP8(0x00LL), MASK_RRE_R2, INSTR_RRE_R2, 3 },
+ { "rre_ra", OP8(0x00LL), MASK_RRE_RA, INSTR_RRE_RA, 3 },
+ { "rre_x", OP8(0x00LL), MASK_RRE_X, INSTR_RRE_X, 3 },
+ { "rrf_f", OP8(0x00LL), MASK_RRF_F, INSTR_RRF_F, 3 },
+ { "rrf_m", OP8(0x00LL), MASK_RRF_M, INSTR_RRF_M, 3 },
+ { "rrf_r", OP8(0x00LL), MASK_RRF_R, INSTR_RRF_R, 3 },
+ { "rrf_rm", OP8(0x00LL), MASK_RRF_RM, INSTR_RRF_RM, 3 },
+ { "rs", OP8(0x00LL), MASK_RS, INSTR_RS, 3 },
+ { "rs_a", OP8(0x00LL), MASK_RS_A, INSTR_RS_A, 3 },
+ { "rs_c", OP8(0x00LL), MASK_RS_C, INSTR_RS_C, 3 },
+ { "rs_d", OP8(0x00LL), MASK_RS_D, INSTR_RS_D, 3 },
+ { "rs_m", OP8(0x00LL), MASK_RS_M, INSTR_RS_M, 3 },
+ { "rs_s", OP8(0x00LL), MASK_RS_S, INSTR_RS_S, 3 },
+ { "rse", OP8(0x00LL), MASK_RSE, INSTR_RSE, 3 },
+ { "rse_m", OP8(0x00LL), MASK_RSE_M, INSTR_RSE_M, 3 },
+ { "rse_r", OP8(0x00LL), MASK_RSE_R, INSTR_RSE_R, 3 },
+ { "rsi_a", OP8(0x00LL), MASK_RSI_A, INSTR_RSI_A, 3 },
+ { "rx", OP8(0x00LL), MASK_RX, INSTR_RX, 3 },
+ { "rx_b", OP8(0x00LL), MASK_RX_B, INSTR_RX_B, 3 },
+ { "rx_d", OP8(0x00LL), MASK_RX_D, INSTR_RX_D, 3 },
+ { "rx_dx", OP8(0x00LL), MASK_RX_DX, INSTR_RX_DX, 3 },
+ { "rx_e", OP8(0x00LL), MASK_RX_E, INSTR_RX_E, 3 },
+ { "rx_ed", OP8(0x00LL), MASK_RX_ED, INSTR_RX_ED, 3 },
+ { "rx_m", OP8(0x00LL), MASK_RX_M, INSTR_RX_M, 3 },
+ { "rxe", OP8(0x00LL), MASK_RXE, INSTR_RXE, 3 },
+ { "rxe_f", OP8(0x00LL), MASK_RXE_F, INSTR_RXE_F, 3 },
+ { "rxf", OP8(0x00LL), MASK_RXF, INSTR_RXF, 3 },
+ { "s", OP8(0x00LL), MASK_S, INSTR_S, 3 },
+ { "si", OP8(0x00LL), MASK_SI, INSTR_SI, 3 },
+ { "ss_l", OP8(0x00LL), MASK_SS_L, INSTR_SS_L, 3 },
+ { "ss_li", OP8(0x00LL), MASK_SS_LI, INSTR_SS_LI, 3 },
+ { "ss_ll", OP8(0x00LL), MASK_SS_LL, INSTR_SS_LL, 3 },
+ { "ss_lmd", OP8(0x00LL), MASK_SS_LMD, INSTR_SS_LMD, 3 },
+ { "ss_plo", OP8(0x00LL), MASK_SS_PLO, INSTR_SS_PLO, 3 },
+ { "ss_rr", OP8(0x00LL), MASK_SS_RR, INSTR_SS_RR, 3 },
+ { "sse", OP8(0x00LL), MASK_SSE, INSTR_SSE, 3 },
+};
+
+const int s390_num_opformats =
+ sizeof (s390_opformats) / sizeof (s390_opformats[0]);
+
+/* The opcode table.
+
+ The format of the opcode table is:
+
+ NAME OPCODE MASK OPERANDS
+
+ NAME is the name of the instruction.
+ OPCODE is the instruction opcode.
+ MASK is the opcode mask; this is used to tell the disassembler
+ which bits in the actual opcode must match OPCODE.
+ OPERANDS is the list of operands.
+
+ The disassembler reads the table in order and prints the first
+ instruction which matches. */
+
+const struct s390_opcode s390_opcodes[] = {
+ { "dp", OP8(0xfdLL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "mp", OP8(0xfcLL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "sp", OP8(0xfbLL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "ap", OP8(0xfaLL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "cp", OP8(0xf9LL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "zap", OP8(0xf8LL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "unpk", OP8(0xf3LL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "pack", OP8(0xf2LL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "mvo", OP8(0xf1LL), MASK_SS_LL, INSTR_SS_LL, 3},
+ { "srp", OP8(0xf0LL), MASK_SS_LI, INSTR_SS_LI, 3},
+ { "lmd", OP8(0xefLL), MASK_SS_LMD, INSTR_SS_LMD, 2},
+ { "plo", OP8(0xeeLL), MASK_SS_PLO, INSTR_SS_PLO, 3},
+ { "msdb", OP48(0xed000000001fLL), MASK_RXF, INSTR_RXF, 3},
+ { "madb", OP48(0xed000000001eLL), MASK_RXF, INSTR_RXF, 3},
+ { "ddb", OP48(0xed000000001dLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "mdb", OP48(0xed000000001cLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "sdb", OP48(0xed000000001bLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "adb", OP48(0xed000000001aLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "cdb", OP48(0xed0000000019LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "kdb", OP48(0xed0000000018LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "meeb", OP48(0xed0000000017LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "sqdb", OP48(0xed0000000015LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "sqeb", OP48(0xed0000000014LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "tcxb", OP48(0xed0000000012LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "tcdb", OP48(0xed0000000011LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "tceb", OP48(0xed0000000010LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "mseb", OP48(0xed000000000fLL), MASK_RXF, INSTR_RXF, 3},
+ { "maeb", OP48(0xed000000000eLL), MASK_RXF, INSTR_RXF, 3},
+ { "deb", OP48(0xed000000000dLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "mdeb", OP48(0xed000000000cLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "seb", OP48(0xed000000000bLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "aeb", OP48(0xed000000000aLL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "ceb", OP48(0xed0000000009LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "keb", OP48(0xed0000000008LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "mxdb", OP48(0xed0000000007LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "lxeb", OP48(0xed0000000006LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "lxdb", OP48(0xed0000000005LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "ldeb", OP48(0xed0000000004LL), MASK_RXE_F, INSTR_RXE_F, 3},
+ { "brxlg", OP48(0xec0000000045LL), MASK_RIE_A, INSTR_RIE_A, 2},
+ { "brxhg", OP48(0xec0000000044LL), MASK_RIE_A, INSTR_RIE_A, 2},
+ { "lmh", OP48(0xeb0000000096LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "icmh", OP48(0xeb0000000080LL), MASK_RSE_M, INSTR_RSE_M, 2},
+ { "bxleg", OP48(0xeb0000000045LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "bxhg", OP48(0xeb0000000044LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "cdsg", OP48(0xeb000000003eLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "csg", OP48(0xeb0000000030LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "lctlg", OP48(0xeb000000002fLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "stcmh", OP48(0xeb000000002cLL), MASK_RSE_M, INSTR_RSE_M, 2},
+ { "stmh", OP48(0xeb0000000026LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "stctg", OP48(0xeb0000000025LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "stmg", OP48(0xeb0000000024LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "clmh", OP48(0xeb0000000020LL), MASK_RSE_M, INSTR_RSE_M, 2},
+ { "rll", OP48(0xeb000000001dLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "rllg", OP48(0xeb000000001cLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "tracg", OP48(0xeb000000000fLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "sllg", OP48(0xeb000000000dLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "srlg", OP48(0xeb000000000cLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "slag", OP48(0xeb000000000bLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "srag", OP48(0xeb000000000aLL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "lmg", OP48(0xeb0000000004LL), MASK_RSE_R, INSTR_RSE_R, 2},
+ { "mvcin", OP8(0xe8LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "mvcdk", OP16(0xe50fLL), MASK_SSE, INSTR_SSE, 3},
+ { "mvcsk", OP16(0xe50eLL), MASK_SSE, INSTR_SSE, 3},
+ { "tprot", OP16(0xe501LL), MASK_SSE, INSTR_SSE, 3},
+ { "strag", OP48(0xe50000000002LL), MASK_SSE, INSTR_SSE, 2},
+ { "lasp", OP16(0xe500LL), MASK_SSE, INSTR_SSE, 3},
+ { "slb", OP48(0xe30000000099LL), MASK_RXE, INSTR_RXE, 2},
+ { "alc", OP48(0xe30000000098LL), MASK_RXE, INSTR_RXE, 2},
+ { "dl", OP48(0xe30000000097LL), MASK_RXE, INSTR_RXE, 2},
+ { "ml", OP48(0xe30000000096LL), MASK_RXE, INSTR_RXE, 2},
+ { "llgh", OP48(0xe30000000091LL), MASK_RXE, INSTR_RXE, 2},
+ { "llgc", OP48(0xe30000000090LL), MASK_RXE, INSTR_RXE, 2},
+ { "lpq", OP48(0xe3000000008fLL), MASK_RXE, INSTR_RXE, 2},
+ { "stpq", OP48(0xe3000000008eLL), MASK_RXE, INSTR_RXE, 2},
+ { "slbg", OP48(0xe30000000089LL), MASK_RXE, INSTR_RXE, 2},
+ { "alcg", OP48(0xe30000000088LL), MASK_RXE, INSTR_RXE, 2},
+ { "dlg", OP48(0xe30000000087LL), MASK_RXE, INSTR_RXE, 2},
+ { "mlg", OP48(0xe30000000086LL), MASK_RXE, INSTR_RXE, 2},
+ { "xg", OP48(0xe30000000082LL), MASK_RXE, INSTR_RXE, 2},
+ { "og", OP48(0xe30000000081LL), MASK_RXE, INSTR_RXE, 2},
+ { "ng", OP48(0xe30000000080LL), MASK_RXE, INSTR_RXE, 2},
+ { "bctg", OP48(0xe30000000046LL), MASK_RXE, INSTR_RXE, 2},
+ { "strvh", OP48(0xe3000000003fLL), MASK_RXE, INSTR_RXE, 2},
+ { "strv", OP48(0xe3000000003eLL), MASK_RXE, INSTR_RXE, 2},
+ { "clgf", OP48(0xe30000000031LL), MASK_RXE, INSTR_RXE, 2},
+ { "cgf", OP48(0xe30000000030LL), MASK_RXE, INSTR_RXE, 2},
+ { "strvg", OP48(0xe3000000002fLL), MASK_RXE, INSTR_RXE, 2},
+ { "cvdg", OP48(0xe3000000002eLL), MASK_RXE, INSTR_RXE, 2},
+ { "stg", OP48(0xe30000000024LL), MASK_RXE, INSTR_RXE, 2},
+ { "clg", OP48(0xe30000000021LL), MASK_RXE, INSTR_RXE, 2},
+ { "cg", OP48(0xe30000000020LL), MASK_RXE, INSTR_RXE, 2},
+ { "lrvh", OP48(0xe3000000001fLL), MASK_RXE, INSTR_RXE, 2},
+ { "lrv", OP48(0xe3000000001eLL), MASK_RXE, INSTR_RXE, 2},
+ { "dsgf", OP48(0xe3000000001dLL), MASK_RXE, INSTR_RXE, 2},
+ { "msgf", OP48(0xe3000000001cLL), MASK_RXE, INSTR_RXE, 2},
+ { "slgf", OP48(0xe3000000001bLL), MASK_RXE, INSTR_RXE, 2},
+ { "algf", OP48(0xe3000000001aLL), MASK_RXE, INSTR_RXE, 2},
+ { "sgf", OP48(0xe30000000019LL), MASK_RXE, INSTR_RXE, 2},
+ { "agf", OP48(0xe30000000018LL), MASK_RXE, INSTR_RXE, 2},
+ { "llgt", OP48(0xe30000000017LL), MASK_RXE, INSTR_RXE, 2},
+ { "llgf", OP48(0xe30000000016LL), MASK_RXE, INSTR_RXE, 2},
+ { "lgf", OP48(0xe30000000014LL), MASK_RXE, INSTR_RXE, 2},
+ { "lrvg", OP48(0xe3000000000fLL), MASK_RXE, INSTR_RXE, 2},
+ { "cvbg", OP48(0xe3000000000eLL), MASK_RXE, INSTR_RXE, 2},
+ { "dsg", OP48(0xe3000000000dLL), MASK_RXE, INSTR_RXE, 2},
+ { "msg", OP48(0xe3000000000cLL), MASK_RXE, INSTR_RXE, 2},
+ { "slg", OP48(0xe3000000000bLL), MASK_RXE, INSTR_RXE, 2},
+ { "alg", OP48(0xe3000000000aLL), MASK_RXE, INSTR_RXE, 2},
+ { "sg", OP48(0xe30000000009LL), MASK_RXE, INSTR_RXE, 2},
+ { "ag", OP48(0xe30000000008LL), MASK_RXE, INSTR_RXE, 2},
+ { "lg", OP48(0xe30000000004LL), MASK_RXE, INSTR_RXE, 2},
+ { "lrag", OP48(0xe30000000003LL), MASK_RXE, INSTR_RXE, 2},
+ { "edmk", OP8(0xdfLL), MASK_SS_L, INSTR_SS_L, 3},
+ { "ed", OP8(0xdeLL), MASK_SS_L, INSTR_SS_L, 3},
+ { "trt", OP8(0xddLL), MASK_SS_L, INSTR_SS_L, 3},
+ { "tr", OP8(0xdcLL), MASK_SS_L, INSTR_SS_L, 3},
+ { "mvcs", OP8(0xdbLL), MASK_SS_RR, INSTR_SS_RR, 3},
+ { "mvcp", OP8(0xdaLL), MASK_SS_RR, INSTR_SS_RR, 3},
+ { "mvck", OP8(0xd9LL), MASK_SS_RR, INSTR_SS_RR, 3},
+ { "xc", OP8(0xd7LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "oc", OP8(0xd6LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "clc", OP8(0xd5LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "nc", OP8(0xd4LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "mvz", OP8(0xd3LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "mvc", OP8(0xd2LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "mvn", OP8(0xd1LL), MASK_SS_L, INSTR_SS_L, 3},
+ { "jg", OP16(0xc0f4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgno", OP16(0xc0e4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnh", OP16(0xc0d4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnp", OP16(0xc0d4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgle", OP16(0xc0c4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnl", OP16(0xc0b4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnm", OP16(0xc0b4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jghe", OP16(0xc0a4LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jge", OP16(0xc084LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgz", OP16(0xc084LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgne", OP16(0xc074LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnz", OP16(0xc074LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnhe", OP16(0xc054LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgl", OP16(0xc044LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgm", OP16(0xc044LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgnle", OP16(0xc034LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgh", OP16(0xc024LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgp", OP16(0xc024LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "jgo", OP16(0xc014LL), MASK_RIL_B, INSTR_RIL_B, 2},
+ { "brasl", OP16(0xc005LL), MASK_RIL_A, INSTR_RIL_A, 2},
+ { "brcl", OP16(0xc004LL), MASK_RIL_MA, INSTR_RIL_MA, 2},
+ { "larl", OP16(0xc000LL), MASK_RIL_A, INSTR_RIL_A, 2},
+ { "icm", OP8(0xbfLL), MASK_RS_M, INSTR_RS_M, 3},
+ { "stcm", OP8(0xbeLL), MASK_RS_M, INSTR_RS_M, 3},
+ { "clm", OP8(0xbdLL), MASK_RS_M, INSTR_RS_M, 3},
+ { "cds", OP8(0xbbLL), MASK_RS, INSTR_RS, 3},
+ { "cs", OP8(0xbaLL), MASK_RS, INSTR_RS, 3},
+ { "esea", OP16(0xb99dLL), MASK_RRE_R, INSTR_RRE_R, 2},
+ { "slbr", OP16(0xb999LL), MASK_RRE, INSTR_RRE, 2},
+ { "alcr", OP16(0xb998LL), MASK_RRE, INSTR_RRE, 2},
+ { "dlr", OP16(0xb997LL), MASK_RRE, INSTR_RRE, 2},
+ { "mlr", OP16(0xb996LL), MASK_RRE, INSTR_RRE, 2},
+ { "epsw", OP16(0xb98dLL), MASK_RRE, INSTR_RRE, 2},
+ { "slbgr", OP16(0xb989LL), MASK_RRE, INSTR_RRE, 2},
+ { "alcgr", OP16(0xb988LL), MASK_RRE, INSTR_RRE, 2},
+ { "dlgr", OP16(0xb987LL), MASK_RRE, INSTR_RRE, 2},
+ { "mlgr", OP16(0xb986LL), MASK_RRE, INSTR_RRE, 2},
+ { "xgr", OP16(0xb982LL), MASK_RRE, INSTR_RRE, 2},
+ { "ogr", OP16(0xb981LL), MASK_RRE, INSTR_RRE, 2},
+ { "ngr", OP16(0xb980LL), MASK_RRE, INSTR_RRE, 2},
+ { "bctgr", OP16(0xb946LL), MASK_RRE, INSTR_RRE, 2},
+ { "clgfr", OP16(0xb931LL), MASK_RRE, INSTR_RRE, 2},
+ { "cgfr", OP16(0xb930LL), MASK_RRE, INSTR_RRE, 2},
+ { "sturg", OP16(0xb925LL), MASK_RRE, INSTR_RRE, 2},
+ { "clgr", OP16(0xb921LL), MASK_RRE, INSTR_RRE, 2},
+ { "cgr", OP16(0xb920LL), MASK_RRE, INSTR_RRE, 2},
+ { "lrvr", OP16(0xb91fLL), MASK_RRE, INSTR_RRE, 2},
+ { "dsgfr", OP16(0xb91dLL), MASK_RRE, INSTR_RRE, 2},
+ { "msgfr", OP16(0xb91cLL), MASK_RRE, INSTR_RRE, 2},
+ { "slgfr", OP16(0xb91bLL), MASK_RRE, INSTR_RRE, 2},
+ { "algfr", OP16(0xb91aLL), MASK_RRE, INSTR_RRE, 2},
+ { "sgfr", OP16(0xb919LL), MASK_RRE, INSTR_RRE, 2},
+ { "agfr", OP16(0xb918LL), MASK_RRE, INSTR_RRE, 2},
+ { "llgtr", OP16(0xb917LL), MASK_RRE, INSTR_RRE, 2},
+ { "llgfr", OP16(0xb916LL), MASK_RRE, INSTR_RRE, 2},
+ { "lgfr", OP16(0xb914LL), MASK_RRE, INSTR_RRE, 2},
+ { "lcgfr", OP16(0xb913LL), MASK_RRE, INSTR_RRE, 2},
+ { "ltgfr", OP16(0xb912LL), MASK_RRE, INSTR_RRE, 2},
+ { "lngfr", OP16(0xb911LL), MASK_RRE, INSTR_RRE, 2},
+ { "lpgfr", OP16(0xb910LL), MASK_RRE, INSTR_RRE, 2},
+ { "lrvgr", OP16(0xb90fLL), MASK_RRE, INSTR_RRE, 2},
+ { "eregg", OP16(0xb90eLL), MASK_RRE, INSTR_RRE, 2},
+ { "dsgr", OP16(0xb90dLL), MASK_RRE, INSTR_RRE, 2},
+ { "msgr", OP16(0xb90cLL), MASK_RRE, INSTR_RRE, 2},
+ { "slgr", OP16(0xb90bLL), MASK_RRE, INSTR_RRE, 2},
+ { "algr", OP16(0xb90aLL), MASK_RRE, INSTR_RRE, 2},
+ { "sgr", OP16(0xb909LL), MASK_RRE, INSTR_RRE, 2},
+ { "agr", OP16(0xb908LL), MASK_RRE, INSTR_RRE, 2},
+ { "lurag", OP16(0xb905LL), MASK_RRE, INSTR_RRE, 2},
+ { "lgr", OP16(0xb904LL), MASK_RRE, INSTR_RRE, 2},
+ { "lcgr", OP16(0xb903LL), MASK_RRE, INSTR_RRE, 2},
+ { "ltgr", OP16(0xb902LL), MASK_RRE, INSTR_RRE, 2},
+ { "lngr", OP16(0xb901LL), MASK_RRE, INSTR_RRE, 2},
+ { "lpgr", OP16(0xb900LL), MASK_RRE, INSTR_RRE, 2},
+ { "lctl", OP8(0xb7LL), MASK_RS_C, INSTR_RS_C, 3},
+ { "stctl", OP8(0xb6LL), MASK_RS_C, INSTR_RS_C, 3},
+ { "cgxr", OP16(0xb3caLL), MASK_RRF_F, INSTR_RRF_F, 2},
+ { "cgdr", OP16(0xb3c9LL), MASK_RRF_F, INSTR_RRF_F, 2},
+ { "cger", OP16(0xb3c8LL), MASK_RRF_F, INSTR_RRF_F, 2},
+ { "cxgr", OP16(0xb3c6LL), MASK_RRE, INSTR_RRE, 2},
+ { "cdgr", OP16(0xb3c5LL), MASK_RRE, INSTR_RRE, 2},
+ { "cegr", OP16(0xb3c4LL), MASK_RRE, INSTR_RRE, 2},
+ { "cgxbr", OP16(0xb3aaLL), MASK_RRF_M, INSTR_RRF_M, 2},
+ { "cgdbr", OP16(0xb3a9LL), MASK_RRF_M, INSTR_RRF_M, 2},
+ { "cgebr", OP16(0xb3a8LL), MASK_RRF_M, INSTR_RRF_M, 2},
+ { "cxgbr", OP16(0xb3a6LL), MASK_RRE, INSTR_RRE, 2},
+ { "cdgbr", OP16(0xb3a5LL), MASK_RRE, INSTR_RRE, 2},
+ { "cegbr", OP16(0xb3a4LL), MASK_RRE, INSTR_RRE, 2},
+ { "cfxbr", OP16(0xb39aLL), MASK_RRF_M, INSTR_RRF_M, 3},
+ { "cfdbr", OP16(0xb399LL), MASK_RRF_M, INSTR_RRF_M, 3},
+ { "cfebr", OP16(0xb398LL), MASK_RRF_M, INSTR_RRF_M, 3},
+ { "cxfbr", OP16(0xb396LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "cdfbr", OP16(0xb395LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "cefbr", OP16(0xb394LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "efpc", OP16(0xb38cLL), MASK_RRE, INSTR_RRE, 3},
+ { "sfpc", OP16(0xb384LL), MASK_RRE, INSTR_RRE, 3},
+ { "fidbr", OP16(0xb35fLL), MASK_RRF_M, INSTR_RRF_M, 3},
+ { "didbr", OP16(0xb35bLL), MASK_RRF_RM, INSTR_RRF_RM, 3},
+ { "fiebr", OP16(0xb357LL), MASK_RRF_M, INSTR_RRF_M, 3},
+ { "diebr", OP16(0xb353LL), MASK_RRF_RM, INSTR_RRF_RM, 3},
+ { "dxbr", OP16(0xb34dLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "mxbr", OP16(0xb34cLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "sxbr", OP16(0xb34bLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "axbr", OP16(0xb34aLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "cxbr", OP16(0xb349LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "kxbr", OP16(0xb348LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "fixbr", OP16(0xb347LL), MASK_RRF_M, INSTR_RRF_M, 3},
+ { "lexbr", OP16(0xb346LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "ldxbr", OP16(0xb345LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "ledbr", OP16(0xb344LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lcxbr", OP16(0xb343LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "ltxbr", OP16(0xb342LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lnxbr", OP16(0xb341LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lpxbr", OP16(0xb340LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "msdbr", OP16(0xb31fLL), MASK_RRF_R, INSTR_RRF_R, 3},
+ { "madbr", OP16(0xb31eLL), MASK_RRF_R, INSTR_RRF_R, 3},
+ { "ddbr", OP16(0xb31dLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "mdbr", OP16(0xb31cLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "sdbr", OP16(0xb31bLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "adbr", OP16(0xb31aLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "cdbr", OP16(0xb319LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "kdbr", OP16(0xb318LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "meebr", OP16(0xb317LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "sqxbr", OP16(0xb316LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "sqdbr", OP16(0xb315LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "sqebr", OP16(0xb314LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lcdbr", OP16(0xb313LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "ltdbr", OP16(0xb312LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lndbr", OP16(0xb311LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lpdbr", OP16(0xb310LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "msebr", OP16(0xb30fLL), MASK_RRF_R, INSTR_RRF_R, 3},
+ { "maebr", OP16(0xb30eLL), MASK_RRF_R, INSTR_RRF_R, 3},
+ { "debr", OP16(0xb30dLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "mdebr", OP16(0xb30cLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "sebr", OP16(0xb30bLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "aebr", OP16(0xb30aLL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "cebr", OP16(0xb309LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "kebr", OP16(0xb308LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "mxdbr", OP16(0xb307LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lxebr", OP16(0xb306LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lxdbr", OP16(0xb305LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "ldebr", OP16(0xb304LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lcebr", OP16(0xb303LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "ltebr", OP16(0xb302LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lnebr", OP16(0xb301LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "lpebr", OP16(0xb300LL), MASK_RRE_F, INSTR_RRE_F, 3},
+ { "trap4", OP16(0xb2ffLL), MASK_S, INSTR_S, 3},
+ { "lpswe", OP16(0xb2b2LL), MASK_S, INSTR_S, 2},
+ { "stfl", OP16(0xb2b1LL), MASK_S, INSTR_S, 2},
+ { "cutfu", OP16(0xb2a7LL), MASK_RRE, INSTR_RRE, 3},
+ { "cuutf", OP16(0xb2a6LL), MASK_RRE, INSTR_RRE, 3},
+ { "tre", OP16(0xb2a5LL), MASK_RRE, INSTR_RRE, 2},
+ { "lfpc", OP16(0xb29dLL), MASK_S, INSTR_S, 3},
+ { "stfpc", OP16(0xb29cLL), MASK_S, INSTR_S, 3},
+ { "srnm", OP16(0xb299LL), MASK_S, INSTR_S, 3},
+ { "stsi", OP16(0xb27dLL), MASK_S, INSTR_S, 3},
+ { "sacf", OP16(0xb279LL), MASK_S, INSTR_S, 3},
+ { "stcke", OP16(0xb278LL), MASK_S, INSTR_S, 2},
+ { "rp", OP16(0xb277LL), MASK_S, INSTR_S, 3},
+ { "siga", OP16(0xb274LL), MASK_S, INSTR_S, 3},
+ { "cmpsc", OP16(0xb263LL), MASK_RRE, INSTR_RRE, 3},
+ { "srst", OP16(0xb25eLL), MASK_RRE, INSTR_RRE, 3},
+ { "clst", OP16(0xb25dLL), MASK_RRE, INSTR_RRE, 3},
+ { "bsa", OP16(0xb25aLL), MASK_RRE, INSTR_RRE, 3},
+ { "bsg", OP16(0xb258LL), MASK_RRE, INSTR_RRE, 3},
+ { "cuse", OP16(0xb257LL), MASK_RRE, INSTR_RRE, 3},
+ { "mvst", OP16(0xb255LL), MASK_RRE, INSTR_RRE, 3},
+ { "mvpg", OP16(0xb254LL), MASK_RRE, INSTR_RRE, 3},
+ { "msr", OP16(0xb252LL), MASK_RRE, INSTR_RRE, 3},
+ { "csp", OP16(0xb250LL), MASK_RRE, INSTR_RRE, 3},
+ { "ear", OP16(0xb24fLL), MASK_RRE_RA, INSTR_RRE_RA, 3},
+ { "sar", OP16(0xb24eLL), MASK_RRE_AR, INSTR_RRE_AR, 3},
+ { "cpya", OP16(0xb24dLL), MASK_RRE_A, INSTR_RRE_A, 3},
+ { "tar", OP16(0xb24cLL), MASK_RRE_AR, INSTR_RRE_AR, 3},
+ { "lura", OP16(0xb24bLL), MASK_RRE, INSTR_RRE, 3},
+ { "esta", OP16(0xb24aLL), MASK_RRE, INSTR_RRE, 3},
+ { "ereg", OP16(0xb249LL), MASK_RRE, INSTR_RRE, 3},
+ { "palb", OP16(0xb248LL), MASK_RRE_O, INSTR_RRE_O, 3},
+ { "msta", OP16(0xb247LL), MASK_RRE_R, INSTR_RRE_R, 3},
+ { "stura", OP16(0xb246LL), MASK_RRE, INSTR_RRE, 3},
+ { "sqer", OP16(0xb245LL), MASK_RRE_E, INSTR_RRE_E, 3},
+ { "sqdr", OP16(0xb244LL), MASK_RRE_D, INSTR_RRE_D, 3},
+ { "cksm", OP16(0xb241LL), MASK_RRE, INSTR_RRE, 3},
+ { "bakr", OP16(0xb240LL), MASK_RRE, INSTR_RRE, 3},
+ { "schm", OP16(0xb23cLL), MASK_S_O, INSTR_S_O, 3},
+ { "rchp", OP16(0xb23bLL), MASK_S_O, INSTR_S_O, 3},
+ { "stcps", OP16(0xb23aLL), MASK_S, INSTR_S, 3},
+ { "stcrw", OP16(0xb239LL), MASK_S, INSTR_S, 3},
+ { "rsch", OP16(0xb238LL), MASK_S_O, INSTR_S_O, 3},
+ { "sal", OP16(0xb237LL), MASK_S_O, INSTR_S_O, 3},
+ { "tpi", OP16(0xb236LL), MASK_S, INSTR_S, 3},
+ { "tsch", OP16(0xb235LL), MASK_S, INSTR_S, 3},
+ { "stsch", OP16(0xb234LL), MASK_S, INSTR_S, 3},
+ { "ssch", OP16(0xb233LL), MASK_S, INSTR_S, 3},
+ { "msch", OP16(0xb232LL), MASK_S, INSTR_S, 3},
+ { "hsch", OP16(0xb231LL), MASK_S_O, INSTR_S_O, 3},
+ { "csch", OP16(0xb230LL), MASK_S_O, INSTR_S_O, 3},
+ { "dxr", OP16(0xb22dLL), MASK_RRE_X, INSTR_RRE_X, 3},
+ { "tb", OP16(0xb22cLL), MASK_RRE_R2, INSTR_RRE_R2, 3},
+ { "sske", OP16(0xb22bLL), MASK_RRE, INSTR_RRE, 3},
+ { "rrbe", OP16(0xb22aLL), MASK_RRE, INSTR_RRE, 3},
+ { "iske", OP16(0xb229LL), MASK_RRE, INSTR_RRE, 3},
+ { "pt", OP16(0xb228LL), MASK_RRE, INSTR_RRE, 3},
+ { "esar", OP16(0xb227LL), MASK_RRE_R, INSTR_RRE_R, 3},
+ { "epar", OP16(0xb226LL), MASK_RRE_R, INSTR_RRE_R, 3},
+ { "ssar", OP16(0xb225LL), MASK_RRE_R, INSTR_RRE_R, 3},
+ { "iac", OP16(0xb224LL), MASK_RRE_R, INSTR_RRE_R, 3},
+ { "ivsk", OP16(0xb223LL), MASK_RRE, INSTR_RRE, 3},
+ { "ipm", OP16(0xb222LL), MASK_RRE_R, INSTR_RRE_R, 3},
+ { "ipte", OP16(0xb221LL), MASK_RRE, INSTR_RRE, 3},
+ { "cfc", OP16(0xb21aLL), MASK_S, INSTR_S, 3},
+ { "sac", OP16(0xb219LL), MASK_S, INSTR_S, 3},
+ { "pc", OP16(0xb218LL), MASK_S, INSTR_S, 3},
+ { "sie", OP16(0xb214LL), MASK_S, INSTR_S, 3},
+ { "stap", OP16(0xb212LL), MASK_S, INSTR_S, 3},
+ { "stpx", OP16(0xb211LL), MASK_S, INSTR_S, 3},
+ { "spx", OP16(0xb210LL), MASK_S, INSTR_S, 3},
+ { "ptlb", OP16(0xb20dLL), MASK_S_O, INSTR_S_O, 3},
+ { "ipk", OP16(0xb20bLL), MASK_S_O, INSTR_S_O, 3},
+ { "spka", OP16(0xb20aLL), MASK_S, INSTR_S, 3},
+ { "stpt", OP16(0xb209LL), MASK_S, INSTR_S, 3},
+ { "spt", OP16(0xb208LL), MASK_S, INSTR_S, 3},
+ { "stckc", OP16(0xb207LL), MASK_S, INSTR_S, 3},
+ { "sckc", OP16(0xb206LL), MASK_S, INSTR_S, 3},
+ { "stck", OP16(0xb205LL), MASK_S, INSTR_S, 3},
+ { "sck", OP16(0xb204LL), MASK_S, INSTR_S, 3},
+ { "stidp", OP16(0xb202LL), MASK_S, INSTR_S, 3},
+ { "lra", OP8(0xb1LL), MASK_RX, INSTR_RX, 3},
+ { "mc", OP8(0xafLL), MASK_SI, INSTR_SI, 3},
+ { "sigp", OP8(0xaeLL), MASK_RS, INSTR_RS, 3},
+ { "stosm", OP8(0xadLL), MASK_SI, INSTR_SI, 3},
+ { "stnsm", OP8(0xacLL), MASK_SI, INSTR_SI, 3},
+ { "clcle", OP8(0xa9LL), MASK_RS, INSTR_RS, 3},
+ { "mvcle", OP8(0xa8LL), MASK_RS, INSTR_RS, 3},
+ { "j", OP16(0xa7f4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jno", OP16(0xa7e4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnh", OP16(0xa7d4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnp", OP16(0xa7d4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jle", OP16(0xa7c4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnl", OP16(0xa7b4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnm", OP16(0xa7b4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jhe", OP16(0xa7a4LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "je", OP16(0xa784LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jz", OP16(0xa784LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jne", OP16(0xa774LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnz", OP16(0xa774LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnhe", OP16(0xa754LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jl", OP16(0xa744LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jm", OP16(0xa744LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jnle", OP16(0xa734LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jh", OP16(0xa724LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jp", OP16(0xa724LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "jo", OP16(0xa714LL), MASK_RI_B, INSTR_RI_B, 3},
+ { "cghi", OP16(0xa70fLL), MASK_RI, INSTR_RI, 2},
+ { "chi", OP16(0xa70eLL), MASK_RI, INSTR_RI, 3},
+ { "mghi", OP16(0xa70dLL), MASK_RI, INSTR_RI, 2},
+ { "mhi", OP16(0xa70cLL), MASK_RI, INSTR_RI, 3},
+ { "aghi", OP16(0xa70bLL), MASK_RI, INSTR_RI, 2},
+ { "ahi", OP16(0xa70aLL), MASK_RI, INSTR_RI, 3},
+ { "lghi", OP16(0xa709LL), MASK_RI, INSTR_RI, 2},
+ { "lhi", OP16(0xa708LL), MASK_RI, INSTR_RI, 3},
+ { "brctg", OP16(0xa707LL), MASK_RI_A, INSTR_RI_A, 2},
+ { "brct", OP16(0xa706LL), MASK_RI_A, INSTR_RI_A, 3},
+ { "bras", OP16(0xa705LL), MASK_RI_A, INSTR_RI_A, 3},
+ { "brc", OP16(0xa704LL), MASK_RI_MA, INSTR_RI_MA, 3},
+ { "tmhl", OP16(0xa703LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "tmhh", OP16(0xa702LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "tml", OP16(0xa701LL), MASK_RI_U, INSTR_RI_U, 3},
+ { "tmll", OP16(0xa701LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "tmh", OP16(0xa700LL), MASK_RI_U, INSTR_RI_U, 3},
+ { "tmlh", OP16(0xa700LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "llill", OP16(0xa50fLL), MASK_RI_U, INSTR_RI_U, 2},
+ { "llilh", OP16(0xa50eLL), MASK_RI_U, INSTR_RI_U, 2},
+ { "llihl", OP16(0xa50dLL), MASK_RI_U, INSTR_RI_U, 2},
+ { "llihh", OP16(0xa50cLL), MASK_RI_U, INSTR_RI_U, 2},
+ { "oill", OP16(0xa50bLL), MASK_RI_U, INSTR_RI_U, 2},
+ { "oilh", OP16(0xa50aLL), MASK_RI_U, INSTR_RI_U, 2},
+ { "oihl", OP16(0xa509LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "oihh", OP16(0xa508LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "nill", OP16(0xa507LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "nilh", OP16(0xa506LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "nihl", OP16(0xa505LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "nihh", OP16(0xa504LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "iill", OP16(0xa503LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "iilh", OP16(0xa502LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "iihl", OP16(0xa501LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "iihh", OP16(0xa500LL), MASK_RI_U, INSTR_RI_U, 2},
+ { "stam", OP8(0x9bLL), MASK_RS_A, INSTR_RS_A, 3},
+ { "lam", OP8(0x9aLL), MASK_RS_A, INSTR_RS_A, 3},
+ { "trace", OP8(0x99LL), MASK_RS, INSTR_RS, 3},
+ { "lm", OP8(0x98LL), MASK_RS, INSTR_RS, 3},
+ { "xi", OP8(0x97LL), MASK_SI, INSTR_SI, 3},
+ { "oi", OP8(0x96LL), MASK_SI, INSTR_SI, 3},
+ { "cli", OP8(0x95LL), MASK_SI, INSTR_SI, 3},
+ { "ni", OP8(0x94LL), MASK_SI, INSTR_SI, 3},
+ { "ts", OP8(0x93LL), MASK_S, INSTR_S, 3},
+ { "mvi", OP8(0x92LL), MASK_SI, INSTR_SI, 3},
+ { "tm", OP8(0x91LL), MASK_SI, INSTR_SI, 3},
+ { "stm", OP8(0x90LL), MASK_RS, INSTR_RS, 3},
+ { "slda", OP8(0x8fLL), MASK_RS_D, INSTR_RS_D, 3},
+ { "srda", OP8(0x8eLL), MASK_RS_D, INSTR_RS_D, 3},
+ { "sldl", OP8(0x8dLL), MASK_RS_D, INSTR_RS_D, 3},
+ { "srdl", OP8(0x8cLL), MASK_RS_D, INSTR_RS_D, 3},
+ { "sla", OP8(0x8bLL), MASK_RS_S, INSTR_RS_S, 3},
+ { "sra", OP8(0x8aLL), MASK_RS_S, INSTR_RS_S, 3},
+ { "sll", OP8(0x89LL), MASK_RS_S, INSTR_RS_S, 3},
+ { "srl", OP8(0x88LL), MASK_RS_S, INSTR_RS_S, 3},
+ { "bxle", OP8(0x87LL), MASK_RS, INSTR_RS, 3},
+ { "bxh", OP8(0x86LL), MASK_RS, INSTR_RS, 3},
+ { "brxle", OP8(0x85LL), MASK_RSI_A, INSTR_RSI_A, 3},
+ { "brxh", OP8(0x84LL), MASK_RSI_A, INSTR_RSI_A, 3},
+ { "diag", OP8(0x83LL), MASK_RS, INSTR_RS, 3},
+ { "lpsw", OP8(0x82LL), MASK_S, INSTR_S, 3},
+ { "ssm", OP8(0x80LL), MASK_S, INSTR_S, 3},
+ { "su", OP8(0x7fLL), MASK_RX_E, INSTR_RX_E, 3},
+ { "au", OP8(0x7eLL), MASK_RX_E, INSTR_RX_E, 3},
+ { "de", OP8(0x7dLL), MASK_RX_E, INSTR_RX_E, 3},
+ { "me", OP8(0x7cLL), MASK_RX_ED, INSTR_RX_ED, 3},
+ { "se", OP8(0x7bLL), MASK_RX_E, INSTR_RX_E, 3},
+ { "ae", OP8(0x7aLL), MASK_RX_E, INSTR_RX_E, 3},
+ { "ce", OP8(0x79LL), MASK_RX_E, INSTR_RX_E, 3},
+ { "le", OP8(0x78LL), MASK_RX_E, INSTR_RX_E, 3},
+ { "ms", OP8(0x71LL), MASK_RX, INSTR_RX, 3},
+ { "ste", OP8(0x70LL), MASK_RX_E, INSTR_RX_E, 3},
+ { "sw", OP8(0x6fLL), MASK_RX_D, INSTR_RX_D, 3},
+ { "aw", OP8(0x6eLL), MASK_RX_D, INSTR_RX_D, 3},
+ { "dd", OP8(0x6dLL), MASK_RX_D, INSTR_RX_D, 3},
+ { "md", OP8(0x6cLL), MASK_RX_D, INSTR_RX_D, 3},
+ { "sd", OP8(0x6bLL), MASK_RX_D, INSTR_RX_D, 3},
+ { "ad", OP8(0x6aLL), MASK_RX_D, INSTR_RX_D, 3},
+ { "cd", OP8(0x69LL), MASK_RX_D, INSTR_RX_D, 3},
+ { "ld", OP8(0x68LL), MASK_RX_D, INSTR_RX_D, 3},
+ { "mxd", OP8(0x67LL), MASK_RX_DX, INSTR_RX_DX, 3},
+ { "std", OP8(0x60LL), MASK_RX_D, INSTR_RX_D, 3},
+ { "sl", OP8(0x5fLL), MASK_RX, INSTR_RX, 3},
+ { "al", OP8(0x5eLL), MASK_RX, INSTR_RX, 3},
+ { "d", OP8(0x5dLL), MASK_RX, INSTR_RX, 3},
+ { "m", OP8(0x5cLL), MASK_RX, INSTR_RX, 3},
+ { "s", OP8(0x5bLL), MASK_RX, INSTR_RX, 3},
+ { "a", OP8(0x5aLL), MASK_RX, INSTR_RX, 3},
+ { "c", OP8(0x59LL), MASK_RX, INSTR_RX, 3},
+ { "l", OP8(0x58LL), MASK_RX, INSTR_RX, 3},
+ { "x", OP8(0x57LL), MASK_RX, INSTR_RX, 3},
+ { "o", OP8(0x56LL), MASK_RX, INSTR_RX, 3},
+ { "cl", OP8(0x55LL), MASK_RX, INSTR_RX, 3},
+ { "n", OP8(0x54LL), MASK_RX, INSTR_RX, 3},
+ { "lae", OP8(0x51LL), MASK_RX, INSTR_RX, 3},
+ { "st", OP8(0x50LL), MASK_RX, INSTR_RX, 3},
+ { "cvb", OP8(0x4fLL), MASK_RX, INSTR_RX, 3},
+ { "cvd", OP8(0x4eLL), MASK_RX, INSTR_RX, 3},
+ { "bas", OP8(0x4dLL), MASK_RX, INSTR_RX, 3},
+ { "mh", OP8(0x4cLL), MASK_RX, INSTR_RX, 3},
+ { "sh", OP8(0x4bLL), MASK_RX, INSTR_RX, 3},
+ { "ah", OP8(0x4aLL), MASK_RX, INSTR_RX, 3},
+ { "ch", OP8(0x49LL), MASK_RX, INSTR_RX, 3},
+ { "lh", OP8(0x48LL), MASK_RX, INSTR_RX, 3},
+ { "b", OP16(0x47f0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bno", OP16(0x47e0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnh", OP16(0x47d0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnp", OP16(0x47d0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "ble", OP16(0x47c0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnl", OP16(0x47b0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnm", OP16(0x47b0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bhe", OP16(0x47a0LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "be", OP16(0x4780LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bz", OP16(0x4780LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bne", OP16(0x4770LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnz", OP16(0x4770LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnhe", OP16(0x4750LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bl", OP16(0x4740LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bm", OP16(0x4740LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bnle", OP16(0x4730LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bh", OP16(0x4720LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bp", OP16(0x4720LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bo", OP16(0x4710LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bc", OP8(0x47LL), MASK_RX_M, INSTR_RX_M, 3},
+ { "nop", OP16(0x4700LL), MASK_RX_B, INSTR_RX_B, 3},
+ { "bct", OP8(0x46LL), MASK_RX, INSTR_RX, 3},
+ { "bal", OP8(0x45LL), MASK_RX, INSTR_RX, 3},
+ { "ex", OP8(0x44LL), MASK_RX, INSTR_RX, 3},
+ { "ic", OP8(0x43LL), MASK_RX, INSTR_RX, 3},
+ { "stc", OP8(0x42LL), MASK_RX, INSTR_RX, 3},
+ { "la", OP8(0x41LL), MASK_RX, INSTR_RX, 3},
+ { "sth", OP8(0x40LL), MASK_RX, INSTR_RX, 3},
+ { "sur", OP8(0x3fLL), MASK_RR_E, INSTR_RR_E, 3},
+ { "aur", OP8(0x3eLL), MASK_RR_E, INSTR_RR_E, 3},
+ { "der", OP8(0x3dLL), MASK_RR_E, INSTR_RR_E, 3},
+ { "mer", OP8(0x3cLL), MASK_RR_ED, INSTR_RR_ED, 3},
+ { "ser", OP8(0x3bLL), MASK_RR_E, INSTR_RR_E, 3},
+ { "aer", OP8(0x3aLL), MASK_RR_E, INSTR_RR_E, 3},
+ { "cer", OP8(0x39LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "ler", OP8(0x38LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "sxr", OP8(0x37LL), MASK_RR_X, INSTR_RR_X, 3},
+ { "axr", OP8(0x36LL), MASK_RR, INSTR_RR, 3},
+ { "lrer", OP8(0x35LL), MASK_RR_DE, INSTR_RR_DE, 3},
+ { "her", OP8(0x34LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "lcer", OP8(0x33LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "lter", OP8(0x32LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "lner", OP8(0x31LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "lper", OP8(0x30LL), MASK_RR_E, INSTR_RR_E, 3},
+ { "swr", OP8(0x2fLL), MASK_RR_D, INSTR_RR_D, 3},
+ { "awr", OP8(0x2eLL), MASK_RR_D, INSTR_RR_D, 3},
+ { "ddr", OP8(0x2dLL), MASK_RR_D, INSTR_RR_D, 3},
+ { "mdr", OP8(0x2cLL), MASK_RR_D, INSTR_RR_D, 3},
+ { "sdr", OP8(0x2bLL), MASK_RR_D, INSTR_RR_D, 3},
+ { "adr", OP8(0x2aLL), MASK_RR_D, INSTR_RR_D, 3},
+ { "cdr", OP8(0x29LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "ldr", OP8(0x28LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "mxdr", OP8(0x27LL), MASK_RR_DX, INSTR_RR_DX, 3},
+ { "mxr", OP8(0x26LL), MASK_RR_X, INSTR_RR_X, 3},
+ { "lrdr", OP8(0x25LL), MASK_RR_XD, INSTR_RR_XD, 3},
+ { "hdr", OP8(0x24LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "lcdr", OP8(0x23LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "ltdr", OP8(0x22LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "lndr", OP8(0x21LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "lpdr", OP8(0x20LL), MASK_RR_D, INSTR_RR_D, 3},
+ { "slr", OP8(0x1fLL), MASK_RR, INSTR_RR, 3},
+ { "alr", OP8(0x1eLL), MASK_RR, INSTR_RR, 3},
+ { "dr", OP8(0x1dLL), MASK_RR, INSTR_RR, 3},
+ { "mr", OP8(0x1cLL), MASK_RR, INSTR_RR, 3},
+ { "sr", OP8(0x1bLL), MASK_RR, INSTR_RR, 3},
+ { "ar", OP8(0x1aLL), MASK_RR, INSTR_RR, 3},
+ { "cr", OP8(0x19LL), MASK_RR, INSTR_RR, 3},
+ { "lr", OP8(0x18LL), MASK_RR, INSTR_RR, 3},
+ { "xr", OP8(0x17LL), MASK_RR, INSTR_RR, 3},
+ { "or", OP8(0x16LL), MASK_RR, INSTR_RR, 3},
+ { "clr", OP8(0x15LL), MASK_RR, INSTR_RR, 3},
+ { "nr", OP8(0x14LL), MASK_RR, INSTR_RR, 3},
+ { "lcr", OP8(0x13LL), MASK_RR, INSTR_RR, 3},
+ { "ltr", OP8(0x12LL), MASK_RR, INSTR_RR, 3},
+ { "lnr", OP8(0x11LL), MASK_RR, INSTR_RR, 3},
+ { "lpr", OP8(0x10LL), MASK_RR, INSTR_RR, 3},
+ { "clcl", OP8(0x0fLL), MASK_RR, INSTR_RR, 3},
+ { "mvcl", OP8(0x0eLL), MASK_RR, INSTR_RR, 3},
+ { "basr", OP8(0x0dLL), MASK_RR, INSTR_RR, 3},
+ { "bassm", OP8(0x0cLL), MASK_RR, INSTR_RR, 3},
+ { "bsm", OP8(0x0bLL), MASK_RR, INSTR_RR, 3},
+ { "svc", OP8(0x0aLL), MASK_RR_I, INSTR_RR_I, 3},
+ { "br", OP16(0x07f0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnor", OP16(0x07e0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnhr", OP16(0x07d0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnpr", OP16(0x07d0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bler", OP16(0x07c0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnlr", OP16(0x07b0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnmr", OP16(0x07b0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bher", OP16(0x07a0LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "ber", OP16(0x0780LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bzr", OP16(0x0780LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bner", OP16(0x0770LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnzr", OP16(0x0770LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnher", OP16(0x0750LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "blr", OP16(0x0740LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bmr", OP16(0x0740LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bnler", OP16(0x0730LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bhr", OP16(0x0720LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bpr", OP16(0x0720LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bor", OP16(0x0710LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bcr", OP8(0x07LL), MASK_RR_M, INSTR_RR_M, 3},
+ { "nopr", OP16(0x0700LL), MASK_RR_B, INSTR_RR_B, 3},
+ { "bctr", OP8(0x06LL), MASK_RR, INSTR_RR, 3},
+ { "balr", OP8(0x05LL), MASK_RR, INSTR_RR, 3},
+ { "spm", OP8(0x04LL), MASK_RR_R, INSTR_RR_R, 3},
+ { "trap2", OP16(0x01ffLL), MASK_E, INSTR_E, 3},
+ { "sam64", OP16(0x010eLL), MASK_E, INSTR_E, 2},
+ { "sam31", OP16(0x010dLL), MASK_E, INSTR_E, 2},
+ { "sam24", OP16(0x010cLL), MASK_E, INSTR_E, 2},
+ { "tam", OP16(0x010bLL), MASK_E, INSTR_E, 2},
+ { "sckpf", OP16(0x0107LL), MASK_E, INSTR_E, 3},
+ { "upt", OP16(0x0102LL), MASK_E, INSTR_E, 3},
+ { "pr", OP16(0x0101LL), MASK_E, INSTR_E, 3}
+};
+
+const int s390_num_opcodes =
+ sizeof (s390_opcodes) / sizeof (s390_opcodes[0]);
+
+
+
diff --git a/opcodes/s390-opc.txt b/opcodes/s390-opc.txt
new file mode 100644
index 0000000..fecb308
--- /dev/null
+++ b/opcodes/s390-opc.txt
@@ -0,0 +1,601 @@
+# S/390 opcodes list. Use s390-mkopc to convert it into the opcode table.
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+5a a RX "add" esa
+6a ad RX_D "add normalized (long)" esa
+2a adr RR_D "add normalized (long)" esa
+7a ae RX_E "add normalized (short)" esa
+3a aer RR_E "add normalized (short)" esa
+4a ah RX "add halfword" esa
+5e al RX "add logical" esa
+1e alr RR "add logical" esa
+fa ap SS_LL "add decimal" esa
+1a ar RR "add" esa
+7e au RX_E "add unnormalized (short)" esa
+3e aur RR_E "add unnormalized (short)" esa
+6e aw RX_D "add unnormalized (long)" esa
+2e awr RR_D "add unnormalized (long)" esa
+36 axr RR "add normalized" esa
+b240 bakr RRE "branch and stack" esa
+45 bal RX "branch and link" esa
+05 balr RR "branch and link" esa
+4d bas RX "branch and save" esa
+0d basr RR "branch and save" esa
+0c bassm RR "branch and save and set mode" esa
+47 bc RX_M "branch on condition" esa
+07 bcr RR_M "branch on condition" esa
+46 bct RX "branch on count" esa
+06 bctr RR "branch on count" esa
+b258 bsg RRE "branch in subspace group" esa
+0b bsm RR "branch and set mode" esa
+86 bxh RS "branch on index high" esa
+87 bxle RS "branch on index low or equal" esa
+59 c RX "compare" esa
+69 cd RX_D "compare (long)" esa
+29 cdr RR_D "compare (long)" esa
+bb cds RS "compare double and swap" esa
+79 ce RX_E "compare (short)" esa
+39 cer RR_E "compare (short)" esa
+b21a cfc S "compare and form codeword" esa
+49 ch RX "compare halfword" esa
+55 cl RX "compare logical" esa
+d5 clc SS_L "compare logical" esa
+0f clcl RR "compare logical long" esa
+95 cli SI "compare logical" esa
+bd clm RS_M "compare logical characters under mask" esa
+15 clr RR "compare logical" esa
+b25d clst RRE "compare logical string" esa
+b263 cmpsc RRE "compression call" esa
+f9 cp SS_LL "compare decimal" esa
+b24d cpya RRE_A "copy access" esa
+19 cr RR "compare" esa
+ba cs RS "compare and swap" esa
+b230 csch S_O "clear subchannel" esa
+b257 cuse RRE "compare until substring equal" esa
+b250 csp RRE "compare and swap and purge" esa
+4f cvb RX "convert to binary" esa
+4e cvd RX "convert to decimal" esa
+5d d RX "divide" esa
+6d dd RX_D "divide (long)" esa
+2d ddr RR_D "divide (long)" esa
+7d de RX_E "divide (short)" esa
+3d der RR_E "divide (short)" esa
+83 diag RS "diagnose" esa
+fd dp SS_LL "divide decimal" esa
+1d dr RR "divide" esa
+b22d dxr RRE_X "divide (ext.)" esa
+b24f ear RRE_RA "extract access" esa
+de ed SS_L "edit" esa
+df edmk SS_L "edit and mark" esa
+b226 epar RRE_R "extract primary ASN" esa
+b249 ereg RRE "extract stacked registers" esa
+b227 esar RRE_R "extract secondary ASN" esa
+b24a esta RRE "extract stacked state" esa
+44 ex RX "execute" esa
+24 hdr RR_D "halve (long)" esa
+34 her RR_E "halve (short)" esa
+b231 hsch S_O "halt subchannel" esa
+b224 iac RRE_R "insert address space control" esa
+43 ic RX "insert character" esa
+bf icm RS_M "insert characters under mask" esa
+b20b ipk S_O "insert PSW key" esa
+b222 ipm RRE_R "insert program mask" esa
+b221 ipte RRE "invalidate page table entry" esa
+b229 iske RRE "insert storage key extended" esa
+b223 ivsk RRE "insert virtual storage key" esa
+58 l RX "load" esa
+41 la RX "load address" esa
+51 lae RX "load address extended" esa
+9a lam RS_A "load access multiple" esa
+e500 lasp SSE "load address space parameters" esa
+23 lcdr RR_D "load complement (long)" esa
+33 lcer RR_E "load complement (short)" esa
+13 lcr RR "load complement" esa
+b7 lctl RS_C "load control" esa
+68 ld RX_D "load (long)" esa
+28 ldr RR_D "load (long)" esa
+78 le RX_E "load (short)" esa
+38 ler RR_E "load (short)" esa
+48 lh RX "load halfword" esa
+98 lm RS "load multiple" esa
+21 lndr RR_D "load negative (long)" esa
+31 lner RR_E "load negative (short)" esa
+11 lnr RR "load negative" esa
+20 lpdr RR_D "load positive (long)" esa
+30 lper RR_E "load positive (short)" esa
+10 lpr RR "load positive" esa
+82 lpsw S "load PSW" esa
+18 lr RR "load" esa
+b1 lra RX "load real address" esa
+25 lrdr RR_XD "load rounded (ext. to long)" esa
+35 lrer RR_DE "load rounded (long to short)" esa
+22 ltdr RR_D "load and test (long)" esa
+32 lter RR_E "load and test (short)" esa
+12 ltr RR "load and test" esa
+b24b lura RRE "load using real address" esa
+5c m RX "multiply" esa
+af mc SI "monitor call" esa
+6c md RX_D "multiply (long)" esa
+2c mdr RR_D "multiply (long)" esa
+7c me RX_ED "multiply (short to long)" esa
+3c mer RR_ED "multiply (short to long)" esa
+4c mh RX "multiply halfword" esa
+fc mp SS_LL "multiply decimal" esa
+1c mr RR "multiply" esa
+b232 msch S "modify subchannel" esa
+b247 msta RRE_R "modify stacked state" esa
+d2 mvc SS_L "move" esa
+e50f mvcdk SSE "move with destination key" esa
+e8 mvcin SS_L "move inverse" esa
+d9 mvck SS_RR "move with key" esa
+0e mvcl RR "move long" esa
+da mvcp SS_RR "move to primary" esa
+db mvcs SS_RR "move to secondary" esa
+e50e mvcsk SSE "move with source key" esa
+92 mvi SI "move" esa
+d1 mvn SS_L "move numerics" esa
+f1 mvo SS_LL "move with offset" esa
+b254 mvpg RRE "move page" esa
+b255 mvst RRE "move string" esa
+d3 mvz SS_L "move zones" esa
+67 mxd RX_DX "multiply (long to ext.)" esa
+27 mxdr RR_DX "multiply (long to ext.)" esa
+26 mxr RR_X "multiply (ext.)" esa
+54 n RX "AND" esa
+d4 nc SS_L "AND" esa
+94 ni SI "AND" esa
+14 nr RR "AND" esa
+56 o RX "OR" esa
+d6 oc SS_L "OR" esa
+96 oi SI "OR" esa
+16 or RR "OR" esa
+f2 pack SS_LL "pack" esa
+b248 palb RRE_O "purge ALB" esa
+b218 pc S "program call" esa
+0101 pr E "program return" esa
+b228 pt RRE "program transfer" esa
+b20d ptlb S_O "purge TLB" esa
+b23b rchp S_O "reset channel path" esa
+b22a rrbe RRE "reset reference bit extended" esa
+b238 rsch S_O "resume subchannel" esa
+5b s RX "subtract" esa
+b219 sac S "set address space control" esa
+b279 sacf S "set address space control fast" esa
+b237 sal S_O "set address limit" esa
+b24e sar RRE_AR "set access" esa
+b23c schm S_O "set channel monitor" esa
+b204 sck S "set clock" esa
+b206 sckc S "set clock comparator" esa
+6b sd RX_D "subtract normalized (long)" esa
+2b sdr RR_D "subtract normalized (long)" esa
+7b se RX_E "subtract normalized (short)" esa
+3b ser RR_E "subtract normalized (short)" esa
+4b sh RX "subtract halfword" esa
+b214 sie S "start interpretive execution" esa
+ae sigp RS "signal processor" esa
+5f sl RX "subtract logical" esa
+8b sla RS_S "shift left single" esa
+8f slda RS_D "shift left double (long)" esa
+8d sldl RS_D "shift left double logical (long)" esa
+89 sll RS_S "shift left single logical" esa
+1f slr RR "subtract logical" esa
+fb sp SS_LL "subtract decimal" esa
+b20a spka S "set PSW key from address" esa
+04 spm RR_R "set program mask" esa
+b208 spt S "set CPU timer" esa
+b210 spx S "set prefix" esa
+b244 sqdr RRE_D "square root (long)" esa
+b245 sqer RRE_E "square root (short)" esa
+1b sr RR "subtract" esa
+8a sra RS_S "shift right single" esa
+8e srda RS_D "shift right double (long)" esa
+8c srdl RS_D "shift right double logical (long)" esa
+88 srl RS_S "shift right single logical" esa
+f0 srp SS_LI "shift and round decimal" esa
+b25e srst RRE "search string" esa
+b225 ssar RRE_R "set secondary ASN" esa
+b233 ssch S "start subchannel" esa
+b22b sske RRE "set storage key extended" esa
+80 ssm S "set system mask" esa
+50 st RX "store" esa
+9b stam RS_A "store access multiple" esa
+b212 stap S "store CPU address" esa
+42 stc RX "store character" esa
+b205 stck S "store clock" esa
+b207 stckc S "store clock comparator" esa
+be stcm RS_M "store characters under mask" esa
+b23a stcps S "store channel path status" esa
+b239 stcrw S "store channel report word" esa
+b6 stctl RS_C "store control" esa
+60 std RX_D "store (long)" esa
+70 ste RX_E "store (short)" esa
+40 sth RX "store halfword" esa
+b202 stidp S "store CPU id" esa
+90 stm RS "store multiple" esa
+ac stnsm SI "store then AND system mask" esa
+ad stosm SI "store then OR system mask" esa
+b209 stpt S "store CPU timer" esa
+b211 stpx S "store prefix" esa
+b234 stsch S "store subchannel" esa
+b246 stura RRE "store using real address" esa
+7f su RX_E "subtract unnormalized (short)" esa
+3f sur RR_E "subtract unnormalized (short)" esa
+0a svc RR_I "supervisor call" esa
+6f sw RX_D "subtract unnormalized (long)" esa
+2f swr RR_D "subtract unnormalized (long)" esa
+37 sxr RR_X "subtract normalized (ext.)" esa
+b24c tar RRE_AR "test access" esa
+b22c tb RRE_R2 "test block" esa
+91 tm SI "test under mask" esa
+b236 tpi S "test pending interruption" esa
+e501 tprot SSE "test protection" esa
+dc tr SS_L "translate" esa
+99 trace RS "trace" esa
+dd trt SS_L "translate and test" esa
+93 ts S "test and set" esa
+b235 tsch S "test subchannel" esa
+f3 unpk SS_LL "unpack" esa
+0102 upt E "update tree" esa
+57 x RX "exclusive OR" esa
+d7 xc SS_L "exclusive OR" esa
+97 xi SI "exclusive OR" esa
+17 xr RR "exclusive OR" esa
+f8 zap SS_LL "zero and add" esa
+a70a ahi RI "add halfword immediate" esa
+84 brxh RSI_A "branch relative on index high" esa
+85 brxle RSI_A "branch relative on index low or equal" esa
+a705 bras RI_A "branch relative and save" esa
+a704 brc RI_MA "branch relative on condition" esa
+a706 brct RI_A "branch relative on count" esa
+b241 cksm RRE "checksum" esa
+a70e chi RI "compare halfword immediate" esa
+a9 clcle RS "compare logical long extended" esa
+a708 lhi RI "load halfword immediate" esa
+a8 mvcle RS "move long extended" esa
+a70c mhi RI "multiply halfword immediate" esa
+b252 msr RRE "multiply single" esa
+71 ms RX "multiply single" esa
+a700 tmh RI_U "test under mask high" esa
+a701 tml RI_U "test under mask low" esa
+0700 nopr RR_B "no operation" esa
+0710 bor RR_B "branch on overflow / if ones" esa
+0720 bhr RR_B "branch on high" esa
+0720 bpr RR_B "branch on plus" esa
+0730 bnler RR_B "branch on not low or equal" esa
+0740 blr RR_B "branch on low" esa
+0740 bmr RR_B "branch on minus / if mixed" esa
+0750 bnher RR_B "branch on not high or equal" esa
+0770 bner RR_B "branch on not equal" esa
+0770 bnzr RR_B "branch on not zero / if not zeros" esa
+0780 ber RR_B "branch on equal" esa
+0780 bzr RR_B "branch on zero / if zeros" esa
+07a0 bher RR_B "branch on high or equal" esa
+07b0 bnlr RR_B "branch on not low" esa
+07b0 bnmr RR_B "branch on not minus / if not mixed" esa
+07c0 bler RR_B "brach on low or equal" esa
+07d0 bnhr RR_B "branch on not high" esa
+07d0 bnpr RR_B "branch on not plus" esa
+07e0 bnor RR_B "branch on not overflow / if not ones" esa
+07f0 br RR_B "unconditional branch" esa
+4700 nop RX_B "no operation" esa
+4710 bo RX_B "branch on overflow / if ones" esa
+4720 bh RX_B "branch on high" esa
+4720 bp RX_B "branch on plus" esa
+4730 bnle RX_B "branch on not low or equal" esa
+4740 bl RX_B "branch on low" esa
+4740 bm RX_B "branch on minus / if mixed" esa
+4750 bnhe RX_B "branch on not high or equal" esa
+4770 bne RX_B "branch on not equal" esa
+4770 bnz RX_B "branch on not zero / if not zeros" esa
+4780 be RX_B "branch on equal" esa
+4780 bz RX_B "branch on zero / if zeros" esa
+47a0 bhe RX_B "branch on high or equal" esa
+47b0 bnl RX_B "branch on not low" esa
+47b0 bnm RX_B "branch on not minus / if not mixed" esa
+47c0 ble RX_B "branch on low or equal" esa
+47d0 bnh RX_B "branch on not high" esa
+47d0 bnp RX_B "branch on not plus" esa
+47e0 bno RX_B "branch on not overflow / if not ones" esa
+47f0 b RX_B "unconditional branch" esa
+a714 jo RI_B "jump on overflow / if ones" esa
+a724 jh RI_B "jump on A high" esa
+a724 jp RI_B "jump on plus" esa
+a734 jnle RI_B "jump on not low or equal" esa
+a744 jl RI_B "jump on A low" esa
+a744 jm RI_B "jump on minus / if mixed" esa
+a754 jnhe RI_B "jump on not high or equal" esa
+a774 jne RI_B "jump on A not equal B" esa
+a774 jnz RI_B "jump on not zero / if not zeros" esa
+a784 je RI_B "jump on A equal B" esa
+a784 jz RI_B "jump on zero / if zeros" esa
+a7a4 jhe RI_B "jump on high or equal" esa
+a7b4 jnl RI_B "jump on A not low" esa
+a7b4 jnm RI_B "jump on not minus / if not mixed" esa
+a7c4 jle RI_B "jump on low or equal" esa
+a7d4 jnh RI_B "jump on A not high" esa
+a7d4 jnp RI_B "jump on not plus" esa
+a7e4 jno RI_B "jump on not overflow / if not ones" esa
+a7f4 j RI_B "jump" esa
+b34a axbr RRE_F "add extended bfp" esa
+b31a adbr RRE_F "add long bfp" esa
+ed000000001a adb RXE_F "add long bfp" esa
+b30a aebr RRE_F "add short bfp" esa
+ed000000000a aeb RXE_F "add short bfp" esa
+b349 cxbr RRE_F "compare extended bfp" esa
+b319 cdbr RRE_F "compare long bfp" esa
+ed0000000019 cdb RXE_F "compare long bfp" esa
+b309 cebr RRE_F "compare short bfp" esa
+ed0000000009 ceb RXE_F "compare short bfp" esa
+b348 kxbr RRE_F "compare and signal extended bfp" esa
+b318 kdbr RRE_F "compare and signal long bfp" esa
+ed0000000018 kdb RXE_F "compare and signal long bfp" esa
+b308 kebr RRE_F "compare and signal short bfp" esa
+ed0000000008 keb RXE_F "compare and signal short bfp" esa
+b396 cxfbr RRE_F "convert from fixed 32 to extended bfp" esa
+b395 cdfbr RRE_F "convert from fixed 32 to long bfp" esa
+b394 cefbr RRE_F "convert from fixed 32 to short bfp" esa
+b39a cfxbr RRF_M "convert to fixed extended bfp to 32" esa
+b399 cfdbr RRF_M "convert to fixed long bfp to 32" esa
+b398 cfebr RRF_M "convert to fixed short bfp to 32" esa
+b34d dxbr RRE_F "divide extended bfp" esa
+b31d ddbr RRE_F "divide long bfp" esa
+ed000000001d ddb RXE_F "divide long bfp" esa
+b30d debr RRE_F "divide short bfp" esa
+ed000000000d deb RXE_F "divide short bfp" esa
+b35b didbr RRF_RM "divide to integer long bfp" esa
+b353 diebr RRF_RM "divide to integer short bfp" esa
+b38c efpc RRE "extract fpc" esa
+b342 ltxbr RRE_F "load and test extended bfp" esa
+b312 ltdbr RRE_F "load and test long bfp" esa
+b302 ltebr RRE_F "load and test short bfp" esa
+b343 lcxbr RRE_F "load complement extended bfp" esa
+b313 lcdbr RRE_F "load complement long bfp" esa
+b303 lcebr RRE_F "load complement short bfp" esa
+b347 fixbr RRF_M "load fp integer extended bfp" esa
+b35f fidbr RRF_M "load fp integer long bfp" esa
+b357 fiebr RRF_M "load fp integer short bfp" esa
+b29d lfpc S "load fpc" esa
+b305 lxdbr RRE_F "load lengthened long to extended bfp" esa
+ed0000000005 lxdb RXE_F "load lengthened long to extended bfp" esa
+b306 lxebr RRE_F "load lengthened short to extended bfp" esa
+ed0000000006 lxeb RXE_F "load lengthened short to extended bfp" esa
+b304 ldebr RRE_F "load lengthened short to long bfp" esa
+ed0000000004 ldeb RXE_F "load lengthened short to long bfp" esa
+b341 lnxbr RRE_F "load negative extended bfp" esa
+b311 lndbr RRE_F "load negative long bfp" esa
+b301 lnebr RRE_F "load negative short bfp" esa
+b340 lpxbr RRE_F "load positive extended bfp" esa
+b310 lpdbr RRE_F "load positive long bfp" esa
+b300 lpebr RRE_F "load positive short bfp" esa
+b345 ldxbr RRE_F "load rounded extended to long bfp" esa
+b346 lexbr RRE_F "load rounded extended to short bfp" esa
+b344 ledbr RRE_F "load rounded long to short bfp" esa
+b34c mxbr RRE_F "multiply extended bfp" esa
+b31c mdbr RRE_F "multiply long bfp" esa
+ed000000001c mdb RXE_F "multiply long bfp" esa
+b307 mxdbr RRE_F "multiply long to extended bfp" esa
+ed0000000007 mxdb RXE_F "multiply long to extended bfp" esa
+b317 meebr RRE_F "multiply short bfp" esa
+ed0000000017 meeb RXE_F "multiply short bfp" esa
+b30c mdebr RRE_F "multiply short to long bfp" esa
+ed000000000c mdeb RXE_F "multiply short to long bfp" esa
+b31e madbr RRF_R "multiply and add long bfp" esa
+ed000000001e madb RXF "multiply and add long bfp" esa
+b30e maebr RRF_R "multiply and add short bfp" esa
+ed000000000e maeb RXF "multiply and add short bfp" esa
+b31f msdbr RRF_R "multiply and subtract long bfp" esa
+ed000000001f msdb RXF "multiply and subtract long bfp" esa
+b30f msebr RRF_R "multiply and subtract short bfp" esa
+ed000000000f mseb RXF "multiply and subtract short bfp" esa
+b384 sfpc RRE "set fpc" esa
+b299 srnm S "set rounding mode" esa
+b316 sqxbr RRE_F "square root extended bfp" esa
+b315 sqdbr RRE_F "square root long bfp" esa
+ed0000000015 sqdb RXE_F "square root long bfp" esa
+b314 sqebr RRE_F "square root short bfp" esa
+ed0000000014 sqeb RXE_F "square root short bfp" esa
+b29c stfpc S "store fpc" esa
+b34b sxbr RRE_F "subtract extended bfp" esa
+b31b sdbr RRE_F "subtract long bfp" esa
+ed000000001b sdb RXE_F "subtract long bfp" esa
+b30b sebr RRE_F "subtract short bfp" esa
+ed000000000b seb RXE_F "subtract short bfp" esa
+ed0000000012 tcxb RXE_F "test data class extended bfp" esa
+ed0000000011 tcdb RXE_F "test data class long bfp" esa
+ed0000000010 tceb RXE_F "test data class short bfp" esa
+b274 siga S "signal adapter" esa
+# are the following instructions confidential ??
+b2a6 cuutf RRE "convert unicode to utf-8" esa
+b2a7 cutfu RRE "convert utf-8 to unicode" esa
+ee plo SS_PLO "perform locked operation" esa
+b25a bsa RRE "branch and set authority" esa
+b277 rp S "resume program" esa
+0107 sckpf E "set clock programmable field" esa
+b27d stsi S "store system information" esa
+01ff trap2 E "trap" esa
+b2ff trap4 S "trap4" esa
+# Here are the new esame instructions:
+b946 bctgr RRE "branch on count 64" esame
+b900 lpgr RRE "load positive 64" esame
+b910 lpgfr RRE "load positive 64<32" esame
+b901 lngr RRE "load negative 64" esame
+b911 lngfr RRE "load negative 64<32" esame
+b902 ltgr RRE "load and test 64" esame
+b912 ltgfr RRE "load and test 64<32" esame
+b903 lcgr RRE "load complement 64" esame
+b913 lcgfr RRE "load complement 64<32" esame
+b980 ngr RRE "and 64" esame
+b921 clgr RRE "compare logical 64" esame
+b931 clgfr RRE "compare logical 64<32" esame
+b981 ogr RRE "or 64" esame
+b982 xgr RRE "exclusive or 64" esame
+b904 lgr RRE "load 64" esame
+b914 lgfr RRE "load 64<32" esame
+b920 cgr RRE "compare 64" esame
+b930 cgfr RRE "compare 64<32" esame
+b908 agr RRE "add 64" esame
+b918 agfr RRE "add 64<32" esame
+b909 sgr RRE "subtract 64" esame
+b919 sgfr RRE "subtract 64<32" esame
+b90a algr RRE "add logical 64" esame
+b91a algfr RRE "add logical 64<32" esame
+b90b slgr RRE "subtract logical 64" esame
+b91b slgfr RRE "subtract logical 64<32" esame
+e30000000046 bctg RXE "branch on count 64" esame
+e3000000002e cvdg RXE "convert to decimal 64" esame
+e3000000000e cvbg RXE "convert to binary 64" esame
+e30000000024 stg RXE "store 64" esame
+e30000000080 ng RXE "and 64" esame
+e30000000021 clg RXE "compare logical 64" esame
+e30000000031 clgf RXE "comparee logical 64<32" esame
+e30000000081 og RXE "or 64" esame
+e30000000082 xg RXE "exclusive or 64" esame
+e30000000004 lg RXE "load 64" esame
+e30000000014 lgf RXE "load 64<32" esame
+e30000000020 cg RXE "compare 64" esame
+e30000000030 cgf RXE "compare 64<32" esame
+e30000000008 ag RXE "add 64" esame
+e30000000018 agf RXE "add 64<32" esame
+e30000000009 sg RXE "subtract 64" esame
+e30000000019 sgf RXE "subtract 64<32" esame
+e3000000000a alg RXE "add logical 64" esame
+e3000000001a algf RXE "add logical 64<32" esame
+e3000000000b slg RXE "subtract logical 64" esame
+e3000000001b slgf RXE "subtract logical 64<32" esame
+e3000000000c msg RXE "multiply single 64" esame
+e3000000001c msgf RXE "multiply single 64<32" esame
+ec0000000044 brxhg RIE_A "branch relative on index high 64" esame
+ec0000000045 brxlg RIE_A "branch relative on index low or equal 64" esame
+eb0000000044 bxhg RSE_R "branch on index high 64" esame
+eb0000000045 bxleg RSE_R "branch on index low or equal 64" esame
+eb000000000c srlg RSE_R "shift right single logical 64" esame
+eb000000000d sllg RSE_R "shift left single logical 64" esame
+eb000000000a srag RSE_R "shift right single 64" esame
+eb000000000b slag RSE_R "shift left single 64" esame
+eb0000000024 stmg RSE_R "store multiple 64" esame
+eb0000000026 stmh RSE_R "store multiple high" esame
+eb0000000004 lmg RSE_R "load multiple 64" esame
+eb0000000096 lmh RSE_R "load multiple high" esame
+ef lmd SS_LMD "load multiple disjoint" esame
+eb000000000f tracg RSE_R "trace 64" esame
+e30000000003 lrag RXE "load real address 64" esame
+e50000000002 strag SSE "store read address" esame
+eb0000000025 stctg RSE_R "store control 64" esame
+eb000000002f lctlg RSE_R "load control 64" esame
+eb0000000030 csg RSE_R "compare and swap 64" esame
+eb000000003e cdsg RSE_R "compare double and swap 64" esame
+eb0000000020 clmh RSE_M "compare logical characters under mask high" esame
+eb000000002c stcmh RSE_M "store characters under mask high" esame
+eb0000000080 icmh RSE_M "insert characters under mask high" esame
+a700 tmlh RI_U "test under mask low high" esame
+a702 tmhh RI_U "test under mask high high" esame
+a701 tmll RI_U "test under mask low low" esame
+a703 tmhl RI_U "test under mask high low" esame
+c004 brcl RIL_MA "branch relative on condition long" esame
+c014 jgo RIL_B "jump long on overflow / if ones" esame
+c024 jgh RIL_B "jump long on high" esame
+c024 jgp RIL_B "jump long on plus" esame
+c034 jgnle RIL_B "jump long on not low or equal" esame
+c044 jgl RIL_B "jump long on low" esame
+c044 jgm RIL_B "jump long on minus / if mixed" esame
+c054 jgnhe RIL_B "jump long on not high or equal" esame
+c074 jgne RIL_B "jump long on not equal" esame
+c074 jgnz RIL_B "jump long on not zero / if not zeros" esame
+c084 jge RIL_B "jump long on equal" esame
+c084 jgz RIL_B "jump long on zero / if zeros" esame
+c0a4 jghe RIL_B "jump long on high or equal" esame
+c0b4 jgnl RIL_B "jump long on not low" esame
+c0b4 jgnm RIL_B "jump long on not minus / if not mixed" esame
+c0c4 jgle RIL_B "jump long on low or equal" esame
+c0d4 jgnh RIL_B "jump long on not high" esame
+c0d4 jgnp RIL_B "jump long on not plus" esame
+c0e4 jgno RIL_B "jump long on not overflow / if not ones" esame
+c0f4 jg RIL_B "jump long" esame
+c005 brasl RIL_A "branch relative and save long" esame
+a707 brctg RI_A "branch relative on count 64" esame
+a709 lghi RI "load halfword immediate 64" esame
+a70b aghi RI "add halfword immediate 64" esame
+a70d mghi RI "multiply halfword immediate 64" esame
+a70f cghi RI "compare halfword immediate 64" esame
+b925 sturg RRE "store using real address 64" esame
+b90e eregg RRE "extract stacked registers 64" esame
+b905 lurag RRE "load using real address 64" esame
+b90c msgr RRE "multiply single 64" esame
+b91c msgfr RRE "multiply single 64<32" esame
+b3a4 cegbr RRE "convert from fixed 64 to short bfp" esame
+b3a5 cdgbr RRE "convert from fixed 64 to long bfp" esame
+b3a6 cxgbr RRE "convert from fixed 64 to extended bfp" esame
+b3a8 cgebr RRF_M "convert to fixed short bfd to 64" esame
+b3a9 cgdbr RRF_M "convert to fixed long bfp to 64" esame
+b3aa cgxbr RRF_M "convert to fixed extended bfp to 64" esame
+b3c4 cegr RRE "convert from fixed 64 to short hfp" esame
+b3c5 cdgr RRE "convert from fixed 64 to long hfp" esame
+b3c6 cxgr RRE "convert from fixed 64 to extended hfp" esame
+b3c8 cger RRF_F "convert to fixed short hfp to 64" esame
+b3c9 cgdr RRF_F "convert to fixed long hfp to 64" esame
+b3ca cgxr RRF_F "convert to fixed extended hfp to 64" esame
+010b tam E "test addressing mode" esame
+010c sam24 E "set addressing mode 24" esame
+010d sam31 E "set addressing mode 31" esame
+010e sam64 E "set addressing mode 64" esame
+a500 iihh RI_U "insert immediate high high" esame
+a501 iihl RI_U "insert immediate high low" esame
+a502 iilh RI_U "insert immediate low high" esame
+a503 iill RI_U "insert immediate low low" esame
+a504 nihh RI_U "and immediate high high" esame
+a505 nihl RI_U "and immediate high low" esame
+a506 nilh RI_U "and immediate low high" esame
+a507 nill RI_U "and immediate low low" esame
+a508 oihh RI_U "or immediate high high" esame
+a509 oihl RI_U "or immediate high low" esame
+a50a oilh RI_U "or immediate low high" esame
+a50b oill RI_U "or immediate low low" esame
+a50c llihh RI_U "load logical immediate high high" esame
+a50d llihl RI_U "load logical immediate high low" esame
+a50e llilh RI_U "load logical immediate low high" esame
+a50f llill RI_U "load logical immediate low low" esame
+b2b1 stfl S "store facility list" esame
+b2b2 lpswe S "load psw extended" esame
+b90d dsgr RRE "divide single 64" esame
+b90f lrvgr RRE "load reversed 64" esame
+b916 llgfr RRE "load logical 64<32" esame
+b917 llgtr RRE "load logical thirty one bits" esame
+b91d dsgfr RRE "divide single 64<32" esame
+b91f lrvr RRE "load reversed 32" esame
+b986 mlgr RRE "multiply logical 64" esame
+b987 dlgr RRE "divide logical 64" esame
+b988 alcgr RRE "add logical with carry 64" esame
+b989 slbgr RRE "subtract logical with borrow 64" esame
+b98d epsw RRE "extract psw" esame
+b996 mlr RRE "multiply logical 32" esame
+b997 dlr RRE "divide logical 32" esame
+b998 alcr RRE "add logical with carry 32" esame
+b999 slbr RRE "subtract logical with borrow 32" esame
+b99d esea RRE_R "extract and set extended authority" esame
+c000 larl RIL_A "load address relative long" esame
+e3000000000d dsg RXE "divide single 64" esame
+e3000000000f lrvg RXE "load reversed 64" esame
+e30000000016 llgf RXE "load logical 64<32" esame
+e30000000017 llgt RXE "load logical thirty one bits" esame
+e3000000001d dsgf RXE "divide single 64<32" esame
+e3000000001e lrv RXE "load reversed 32" esame
+e3000000001f lrvh RXE "load reversed 16" esame
+e3000000002f strvg RXE "store reversed 64" esame
+e3000000003e strv RXE "store reversed 32" esame
+e3000000003f strvh RXE "store reversed 64" esame
+e30000000086 mlg RXE "multiply logical 64" esame
+e30000000087 dlg RXE "divide logical 64" esame
+e30000000088 alcg RXE "add logical with carry 64" esame
+e30000000089 slbg RXE "subtract logical with borrow 64" esame
+e3000000008e stpq RXE "store pair to quadword" esame
+e3000000008f lpq RXE "load pair from quadword" esame
+e30000000096 ml RXE "multiply logical 32" esame
+e30000000097 dl RXE "divide logical 32" esame
+e30000000098 alc RXE "add logical with carry 32" esame
+e30000000099 slb RXE "subtract logical with borrow 32" esame
+e30000000090 llgc RXE "load logical character" esame
+e30000000091 llgh RXE "load logical halfword" esame
+eb000000001c rllg RSE_R "rotate left single logical 64" esame
+eb000000001d rll RSE_R "rotate left single logical 32" esame
+b278 stcke S "store clock extended" esame
+b2a5 tre RRE "translate extended" esame