summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/ld/testsuite/ld-mmix
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/ld/testsuite/ld-mmix')
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/b-offloc.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/b-offlocmis.s17
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/bpo-18.d1
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/bpo-22.d1
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/bspec1.d6
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/bspec2.d6
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/greg-6.d1
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/greg-7.d1
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/loc4.d1
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/local1.d3
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/local3.d3
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/local5.d3
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/local7.d3
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/loct-1.d1
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/mmix.exp2
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/sec-10.d18
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/sec-10.s8
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/sec-11.d7
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/sec-11.ld10
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/sec-12.d26
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/undef-3.d6
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap1.d21
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap1a.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap1b.s4
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap1c.s4
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap2.d21
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap3.d21
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap3a.s2
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap3b.s4
-rw-r--r--binutils-2.25/ld/testsuite/ld-mmix/wrap4.d21
30 files changed, 201 insertions, 25 deletions
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/b-offloc.s b/binutils-2.25/ld/testsuite/ld-mmix/b-offloc.s
index c2fb2cc..1114b34 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/b-offloc.s
+++ b/binutils-2.25/ld/testsuite/ld-mmix/b-offloc.s
@@ -1,6 +1,6 @@
% The .text contents is supposed to be linked --oformat binary with
% b-post1.s and b-goodmain.s. The code below will provide a LOP_LOC
-% with a 64-bit address (0x789abcdef0123456) then 16 bytes of % random data.
+% with a 64-bit address (0x789abcdef0123458) then 16 bytes of % random data.
.text
.byte 0x98,1,0,2
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/b-offlocmis.s b/binutils-2.25/ld/testsuite/ld-mmix/b-offlocmis.s
new file mode 100644
index 0000000..4f2b340
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/b-offlocmis.s
@@ -0,0 +1,17 @@
+% The .text contents is supposed to be linked --oformat binary with
+% b-post1.s and b-goodmain.s. The code below will provide a LOP_LOC
+% with a 64-bit address (0x789abcdef012345b) then 16 bytes of % random
+% data. Note that the address is misaligned and the contents should
+% be handled as at 0x789abcdef0123458. After that, there's another
+% LOP_LOC, about 32 bytes further on, also at a misaligned address:
+% this time the data (0x12345677) is entered with a LOP_QUOTE.
+
+ .text
+ .byte 0x98,1,0,2
+ .8byte 0x789abcdef012345b
+ .byte 0xb0,0x45,0x19,0x7d,0x2c,0x1b,0x3,0xb2
+ .byte 0xe4,0xdb,0xf8,0x77,0xf,0xc7,0x66,0xfb
+ .byte 0x98,1,0,2
+ .8byte 0x789abcdef012347a
+ .byte 0x98,0,0,1
+ .byte 0x12,0x34,0x56,0x77
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/bpo-18.d b/binutils-2.25/ld/testsuite/ld-mmix/bpo-18.d
index 7e06fae..1f24f60 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/bpo-18.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/bpo-18.d
@@ -15,7 +15,6 @@ SYMBOL TABLE:
0+7e0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
0+ l df \*ABS\* 0+ .*
4000000000001064 l \.text\.away 0+ x
-0+ l df \*ABS\* 0+ .*
0+100 g \.text 0+ x
4000000000001060 g \.text\.away 0+ Main
0+104 g \.text 0+ x2
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/bpo-22.d b/binutils-2.25/ld/testsuite/ld-mmix/bpo-22.d
index 127b489..e034b0a 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/bpo-22.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/bpo-22.d
@@ -14,7 +14,6 @@ SYMBOL TABLE:
0+7f0 l d \.MMIX\.reg_contents 0+ (|\.MMIX\.reg_contents)
0+ l df \*ABS\* 0+ .*
0+4 l \.text 0+ x
-0+ l df \*ABS\* 0+ .*
0+ g \.text 0+ Main
0+ g \.text 0+ _start
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/bspec1.d b/binutils-2.25/ld/testsuite/ld-mmix/bspec1.d
index 16db5f4..cc5b7fd 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/bspec1.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/bspec1.d
@@ -3,7 +3,7 @@
#ld: -m elf64mmix
#readelf: -Ssr -x1 -x2
-There are 6 section headers, starting at offset 0xb8:
+There are 6 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -16,9 +16,9 @@ Section Headers:
+0+4 +0+ +0 +0 +4
+\[ 3\] \.shstrtab +STRTAB +0+ +0+80
+0+33 +0+ +0 +0 +1
- +\[ 4\] \.symtab +SYMTAB +0+ +0+238
+ +\[ 4\] \.symtab +SYMTAB +0+ .*
+0+d8 +0+18 +5 +3 +8
- +\[ 5\] \.strtab +STRTAB +0+ +0+310
+ +\[ 5\] \.strtab +STRTAB +0+ .*
+0+2d +0+ +0 +0 +1
Key to Flags:
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/bspec2.d b/binutils-2.25/ld/testsuite/ld-mmix/bspec2.d
index d2fd6dd..2f61c08 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/bspec2.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/bspec2.d
@@ -6,7 +6,7 @@
#ld: -m elf64mmix
#readelf: -Ssr -x1 -x2 -x3
-There are 7 section headers, starting at offset 0xd0:
+There are 7 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -21,9 +21,9 @@ Section Headers:
+0+4 +0+ +0 +0 +4
+\[ 4\] \.shstrtab +STRTAB +0+ +0+88
+0+45 +0+ +0 +0 +1
- +\[ 5\] \.symtab +SYMTAB +0+ +0+290
+ +\[ 5\] \.symtab +SYMTAB +0+ .*
+0+108 +0+18 +6 +4 +8
- +\[ 6\] \.strtab +STRTAB +0+ +0+398
+ +\[ 6\] \.strtab +STRTAB +0+ .*
+0+32 +0+ +0 +0 +1
Key to Flags:
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/greg-6.d b/binutils-2.25/ld/testsuite/ld-mmix/greg-6.d
index d8157f7..4327952 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/greg-6.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/greg-6.d
@@ -290,7 +290,6 @@ SYMBOL TABLE:
0+fc l \*REG\* 0+ lsym
0+ l df \*ABS\* 0+ .*
0+fd l \*REG\* 0+ lsym
-0+ l df \*ABS\* 0+ .*
0+14 g \.text 0+ _start
0+fe g \*REG\* 0+ areg
2000000000000000 g \.text 0+ __bss_start
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/greg-7.d b/binutils-2.25/ld/testsuite/ld-mmix/greg-7.d
index 57df901..3afd3ab 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/greg-7.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/greg-7.d
@@ -290,7 +290,6 @@ SYMBOL TABLE:
0+fd l \*REG\* 0+ lsym
0+ l df \*ABS\* 0+ .*
0+fe l \*REG\* 0+ lsym
-0+ l df \*ABS\* 0+ .*
0+14 g \.text 0+ _start
0+20 g \*REG\* 0+ areg
2000000000000000 g \.text 0+ __bss_start
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/loc4.d b/binutils-2.25/ld/testsuite/ld-mmix/loc4.d
index dccfb76..6b93658 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/loc4.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/loc4.d
@@ -13,7 +13,6 @@ SYMBOL TABLE:
2000000000000000 l d \.data 0+ (|\.data)
0+ l df \*ABS\* 0+ .*
2000000000000000 l \.data 0+ xx
-0+ l df \*ABS\* 0+ .*
0+1004 g F \.text 0+ Main
2000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.data
0+1004 g \.text 0+ _start
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/local1.d b/binutils-2.25/ld/testsuite/ld-mmix/local1.d
index 8252971..ab91710 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/local1.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/local1.d
@@ -10,7 +10,7 @@
# (different meaning of "local" than for symbol), which can be seen as
# somewhat twisted.
-There are 6 section headers, starting at offset 0xc8:
+There are 6 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -39,7 +39,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +PRC\[0xff00\] ext1
.* 0+4 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/local3.d b/binutils-2.25/ld/testsuite/ld-mmix/local3.d
index c559ec2..efcef6d 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/local3.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/local3.d
@@ -8,7 +8,7 @@
# Like local1, but ext1 is here a constant, not a global register.
-There are 6 section headers, starting at offset 0xc8:
+There are 6 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -37,7 +37,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
.* 0+4 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/local5.d b/binutils-2.25/ld/testsuite/ld-mmix/local5.d
index 802f282..a89b9af 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/local5.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/local5.d
@@ -9,7 +9,7 @@
# Like local1, but with two checks for a local register.
-There are 6 section headers, starting at offset 0xc8:
+There are 6 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -38,7 +38,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +PRC\[0xff00\] ext1
.* 0+8 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/local7.d b/binutils-2.25/ld/testsuite/ld-mmix/local7.d
index 7a5847b..cd6a4a7 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/local7.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/local7.d
@@ -10,7 +10,7 @@
# Like local1, but ext1 is here a constant, not a global register and two
# local-register checks.
-There are 6 section headers, starting at offset 0xc8:
+There are 6 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -39,7 +39,6 @@ Symbol table '\.symtab' contains [0-9]+ entries:
.* 0+fd +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fe +0 +NOTYPE +LOCAL +DEFAULT +PRC\[0xff00\] lsym
-.* 0+ +0 +FILE +LOCAL +DEFAULT +ABS .*
.* 0+fc +0 +NOTYPE +GLOBAL +DEFAULT +ABS ext1
.* 0+8 +0 +NOTYPE +GLOBAL +DEFAULT +1 _start
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/loct-1.d b/binutils-2.25/ld/testsuite/ld-mmix/loct-1.d
index 853b065..a0b38d4 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/loct-1.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/loct-1.d
@@ -9,7 +9,6 @@ SYMBOL TABLE:
0+1004 l d \.text 0+ (|\.text)
0+ l df \*ABS\* 0+ .*
0+1004 l \.text 0+ t
-0+ l df \*ABS\* 0+ .*
0+100c g \.text 0+ _start
0+1004 g \*ABS\* 0+ __\.MMIX\.start\.\.text
2000000000000000 g \.text 0+ __bss_start
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/mmix.exp b/binutils-2.25/ld/testsuite/ld-mmix/mmix.exp
index e44101e..a7b7de0 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/mmix.exp
+++ b/binutils-2.25/ld/testsuite/ld-mmix/mmix.exp
@@ -1,5 +1,5 @@
# Expect script for ld-mmix tests
-# Copyright 2001, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/sec-10.d b/binutils-2.25/ld/testsuite/ld-mmix/sec-10.d
new file mode 100644
index 0000000..a1c558d
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/sec-10.d
@@ -0,0 +1,18 @@
+#source: start.s
+#source: sec-10.s
+#ld: -m mmo
+#objdump: -s
+
+# There was yet another bug in the strip-zeros-at-beginning-and-end-of-data
+# code: it requires outputting the location when data is stripped, and that
+# location is only valid for tetra alignments as the low bits are ignored.
+
+.*: file format mmo
+
+Contents of section \.text:
+ 0*0 e3fd0001 2a000000 00000000 00000000 .*
+ 0*10 00000000 00000000 00000000 00000000 .*
+#...
+ 0*7ff0 00000000 00000000 00000000 00000000 .*
+ 0*8000 00000000 00000000 00000000 2b2c0000 .*
+
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/sec-10.s b/binutils-2.25/ld/testsuite/ld-mmix/sec-10.s
new file mode 100644
index 0000000..2729e55
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/sec-10.s
@@ -0,0 +1,8 @@
+ .section .text.1
+ .byte 42
+ .byte 0,0,0,0, 0,0,0,0, 0,0,0,0
+
+ .section .text.2
+ .space 32752
+ .byte 0,0,0,0, 0,0,0,0, 0,0,0
+ .byte 43,44,0,0
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/sec-11.d b/binutils-2.25/ld/testsuite/ld-mmix/sec-11.d
new file mode 100644
index 0000000..3a60934
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/sec-11.d
@@ -0,0 +1,7 @@
+#source: start.s
+#ld: -m mmo -T$srcdir/$subdir/sec-11.ld
+#error: contents at non-multiple-of-4 address
+
+# A trivial check that we get a graceful error when trying to emit
+# (loadable, addressable) contents at a misaligned address. Note
+# that e.g. debug sections do not have loadable contents.
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/sec-11.ld b/binutils-2.25/ld/testsuite/ld-mmix/sec-11.ld
new file mode 100644
index 0000000..a36ca1e
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/sec-11.ld
@@ -0,0 +1,10 @@
+OUTPUT_ARCH(mmix)
+ENTRY(Main)
+SECTIONS
+{
+ .text 0x101 : /* Note the misaligned address; must trig a linker error. */
+ { *(.text*); Main = _start; }
+
+ .MMIX.reg_contents :
+ { *(.MMIX.reg_contents.linker_allocated); *(.MMIX.reg_contents); }
+}
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/sec-12.d b/binutils-2.25/ld/testsuite/ld-mmix/sec-12.d
new file mode 100644
index 0000000..720789e
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/sec-12.d
@@ -0,0 +1,26 @@
+#source: b-twoinsn.s
+#source: b-offlocmis.s
+#source: b-post1.s
+#source: b-goodmain.s
+#ld: --oformat binary
+#objdump: -sh
+
+# Check that a LOP_LOC at a misaligned location followed by a
+# LOP_QUOTE hits the corresponding aligned address. This is a
+# variant of sec-5.d with the lop_loc having a misalignment, followed
+# by another misaligned lop_loc with a lop_quot.
+
+.*: file format mmo
+
+Sections:
+Idx Name Size VMA LMA File off Algn
+ 0 \.text 0+8 0+ 0+ 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD, CODE
+ 1 \.MMIX\.sec\.0 0+24 789abcdef0123458 789abcdef0123458 0+ 2\*\*2
+ CONTENTS, ALLOC, LOAD
+Contents of section \.text:
+ 0+ e3fd0001 e3fd0004 .*
+Contents of section \.MMIX\.sec\.0:
+ 789abcdef0123458 b045197d 2c1b03b2 e4dbf877 0fc766fb .*
+ 789abcdef0123468 00000000 00000000 00000000 00000000 .*
+ 789abcdef0123478 12345677 .*
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/undef-3.d b/binutils-2.25/ld/testsuite/ld-mmix/undef-3.d
index 93d7a99..2f551b9 100644
--- a/binutils-2.25/ld/testsuite/ld-mmix/undef-3.d
+++ b/binutils-2.25/ld/testsuite/ld-mmix/undef-3.d
@@ -2,7 +2,7 @@
#ld: -u undefd -m elf64mmix
#readelf: -S -s
-There are 5 section headers, starting at offset 0xa0:
+There are 5 section headers, starting at offset .*:
Section Headers:
+\[Nr\] Name +Type +Address +Offset
@@ -13,9 +13,9 @@ Section Headers:
+0+4 +0+ +AX +0 +0 +4
+\[ 2\] \.shstrtab +STRTAB +0+ +0+7c
+0+21 +0+ +0 +0 +1
- +\[ 3\] \.symtab +SYMTAB +0+ +0+1e0
+ +\[ 3\] \.symtab +SYMTAB +0+ .*
+0+c0 +0+18 +4 +2 +8
- +\[ 4\] \.strtab +STRTAB +0+ +0+2a0
+ +\[ 4\] \.strtab +STRTAB +0+ .*
+0+2f +0+ +0 +0 +1
Key to Flags:
#...
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap1.d b/binutils-2.25/ld/testsuite/ld-mmix/wrap1.d
new file mode 100644
index 0000000..02d7bef
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap1.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: wrap1a.s
+#source: wrap1b.s
+#source: wrap1c.s
+#ld: -m mmo --wrap deal
+#as: -no-expand
+#objdump: -d
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(_start|Main)>:
+ 0: e3fd0001 setl \$253,0x1
+ 4: f2000001 pushj \$0,8 <__wrap_deal>
+
+0+8 <__wrap_deal>:
+ 8: f0000001 jmp c <deal>
+
+0+c <deal>:
+ c: fd000000 swym 0,0,0
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap1a.s b/binutils-2.25/ld/testsuite/ld-mmix/wrap1a.s
new file mode 100644
index 0000000..88a5cd2
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap1a.s
@@ -0,0 +1,2 @@
+ .text
+ pushj $0,deal
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap1b.s b/binutils-2.25/ld/testsuite/ld-mmix/wrap1b.s
new file mode 100644
index 0000000..367aea0
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap1b.s
@@ -0,0 +1,4 @@
+ .text
+ .globl __wrap_deal
+__wrap_deal:
+ jmp __real_deal
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap1c.s b/binutils-2.25/ld/testsuite/ld-mmix/wrap1c.s
new file mode 100644
index 0000000..a7678d4
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap1c.s
@@ -0,0 +1,4 @@
+ .text
+ .globl deal
+deal:
+ swym 0
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap2.d b/binutils-2.25/ld/testsuite/ld-mmix/wrap2.d
new file mode 100644
index 0000000..49b4d3b
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap2.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: wrap1a.s
+#source: wrap1b.s
+#source: wrap1c.s
+#ld: -m elf64mmix --wrap deal
+#as: -no-expand
+#objdump: -d
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <(_start|Main)>:
+ 0: e3fd0001 setl \$253,0x1
+ 4: f2000001 pushj \$0,8 <__wrap_deal>
+
+0+8 <__wrap_deal>:
+ 8: f0000001 jmp c <deal>
+
+0+c <deal>:
+ c: fd000000 swym 0,0,0
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap3.d b/binutils-2.25/ld/testsuite/ld-mmix/wrap3.d
new file mode 100644
index 0000000..80b20f1
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap3.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: wrap3a.s
+#source: wrap3b.s
+#source: wrap1c.s
+#ld: -m mmo
+#as: -no-expand
+#objdump: -d
+
+.*: file format mmo
+
+Disassembly of section \.text:
+
+0+ <(_start|Main)>:
+ 0: e3fd0001 setl \$253,0x1
+ 4: f2000001 pushj \$0,8 <__wrap_deal>
+
+0+8 <__wrap_deal>:
+ 8: f0000001 jmp c <deal>
+
+0+c <deal>:
+ c: fd000000 swym 0,0,0
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap3a.s b/binutils-2.25/ld/testsuite/ld-mmix/wrap3a.s
new file mode 100644
index 0000000..7192a93
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap3a.s
@@ -0,0 +1,2 @@
+ .text
+ pushj $0,__wrap_deal
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap3b.s b/binutils-2.25/ld/testsuite/ld-mmix/wrap3b.s
new file mode 100644
index 0000000..6a8a606
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap3b.s
@@ -0,0 +1,4 @@
+ .text
+ .globl __wrap_deal
+__wrap_deal:
+ jmp deal
diff --git a/binutils-2.25/ld/testsuite/ld-mmix/wrap4.d b/binutils-2.25/ld/testsuite/ld-mmix/wrap4.d
new file mode 100644
index 0000000..a64578d
--- /dev/null
+++ b/binutils-2.25/ld/testsuite/ld-mmix/wrap4.d
@@ -0,0 +1,21 @@
+#source: start.s
+#source: wrap3a.s
+#source: wrap3b.s
+#source: wrap1c.s
+#ld: -m elf64mmix
+#as: -no-expand
+#objdump: -d
+
+.*: file format elf64-mmix
+
+Disassembly of section \.text:
+
+0+ <(_start|Main)>:
+ 0: e3fd0001 setl \$253,0x1
+ 4: f2000001 pushj \$0,8 <__wrap_deal>
+
+0+8 <__wrap_deal>:
+ 8: f0000001 jmp c <deal>
+
+0+c <deal>:
+ c: fd000000 swym 0,0,0