+2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ld-mmix/bpo-1.d, ld-mmix/bpo-1.s, ld-mmix/bpo-1m.d,
+ ld-mmix/bpo-15.d, ld-mmix/bpo-4.s, ld-mmix/bpo-6.d,
+ ld-mmix/bpo-6.s, ld-mmix/bpo-2.d, ld-mmix/bpo-6m.d,
+ ld-mmix/bpo-12m.d, ld-mmix/bpo-2m.d, ld-mmix/bpo-2.s,
+ ld-mmix/bpo-5.s, ld-mmix/bpo-3.d, ld-mmix/start3.s,
+ ld-mmix/bpo-3m.d, ld-mmix/bpo-9m.d, ld-mmix/bpo-4.d,
+ ld-mmix/bpo-3.s, ld-mmix/bpo-4m.d, ld-mmix/bpo-7.d,
+ ld-mmix/bpo-5.d, ld-mmix/bpo-16.d, ld-mmix/bpo-5m.d,
+ ld-mmix/bpo-7m.d, ld-mmix/bpo-9.d, ld-mmix/bpo-8.d,
+ ld-mmix/start4.s, ld-mmix/bpo-8m.d, ld-mmix/bpo-13m.d,
+ ld-mmix/bpo-15m.d, ld-mmix/bpo-10.d, ld-mmix/bpo-11.d,
+ ld-mmix/bpo-14m.d, ld-mmix/bpo-13.d, ld-mmix/bpo-7.s,
+ ld-mmix/bpo-12.d, ld-mmix/bpo-16m.d, ld-mmix/bpo-14.d,
+ ld-mmix/bpo-8.s, ld-mmix/bpo-17.d, ld-mmix/bpo-17m.d: New tests.
+
2002-01-31 Hans-Peter Nilsson <hp@axis.com>
* ld-cris/weakref1.d, ld-cris/libdso-1.d, ld-cris/gotrel2.s,
--- /dev/null
+#source: start.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Just a simple linker-allocated GREG with no explicit GREGs.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0000000000000000 l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7f0 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe00 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000002e .*
--- /dev/null
+# A most simple instruction needing a linker-supplied GREG.
+x LDA $42,x+42
--- /dev/null
+#source: start4.s
+#source: bpo-6.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix --gc-sections
+#objdump: -st
+
+# Check that GC removes all (two) BPO:s when all are collected.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.init 0+
+0+4 l d \.text 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7f8 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l \.init 0+ _start
+0+ g \*ABS\* 0+
+0+ g \*ABS\* 0+
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+4 g O \.text 0+ _start\.
+
+Contents of section \.init:
+ 0000 e37704a6 .*
+Contents of section \.text:
+Contents of section \.sbss:
+Contents of section \.bss:
+Contents of section \.MMIX\.reg_contents:
--- /dev/null
+#source: start3.s
+#source: bpo-6.s
+#source: bpo-2.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix --gc-sections
+#objdump: -st
+
+# Check that GC removes one of the three BPO:s, for the collected section.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.init 0+
+0+10 l d \.text 0+
+20+ l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7e8 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l \.init 0+ _start
+0+14 g \.text 0+ x
+0+10 g \.text 0+ x2
+2000000000000000 g O \*ABS\* 0+ __bss_start
+0+ g \*ABS\* 0+
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+10 g O \.text 0+ _start\.
+
+
+Contents of section \.init:
+ 0000 00000000 0000003d 00000000 0000003a .*
+Contents of section \.text:
+ 0010 232dfe00 232dfd00 .*
+Contents of section \.sbss:
+Contents of section \.bss:
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000107c 00000000 0000a420 .*
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 1: a GREG allocated register.
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 1: a GREG allocated register.
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: areg-256.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 2: a register symbol.
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: areg-256.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: base-plus-offset relocation against register symbol
+
+# Check that we get an error message if we see a BPO against a register
+# symbol. Variant 2: a register symbol.
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# A BPO against an external symbol.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7f0 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ g \.text 0+ _start
+0+8 g \.text 0+ areg
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 fd040810 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000003 .*
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# A BPO against an external symbol.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+8 g \.text areg
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000003 .*
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: ^[^c][^h][^i][^l][^d].* undefined reference to `areg'$
+
+# A BPO against an undefined symbol.
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: ^[^c][^h][^i][^l][^d].* undefined reference to `areg'$
+
+# A BPO against an undefined symbol.
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Two BPO:s against the same value get merged.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7f0 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ g \.text 0+ _start
+0+c g \.text 0+ areg
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 234dfe00 fd040810 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000007 .*
--- /dev/null
+#source: start.s
+#source: bpo-7.s
+#source: bpo-7.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Two BPO:s against the same value get merged.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+c g \.text areg
+
+Contents of section \.text:
+ 0000 e3fd0001 234dfe00 234dfe00 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000007 .*
--- /dev/null
+#source: start.s
+#source: bpo-8.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# A BPO and another reloc in the same section.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7f0 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ g \.text 0+ _start
+0+10 g \.text 0+ areg
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 2336fe00 00000000 0000000c .*
+ 0010 fd040810 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000008 .*
--- /dev/null
+#source: start.s
+#source: bpo-8.s
+#source: areg-t.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# A BPO and another reloc in the same section.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+10 g \.text areg
+
+
+Contents of section \.text:
+ 0000 e3fd0001 2336fe00 00000000 0000000c .*
+ 0010 fd040810 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000008 .*
--- /dev/null
+#source: start.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Just a simple linker-allocated GREG with no explicit GREGs.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000002e .*
--- /dev/null
+#source: start.s
+#source: greg-1.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Just a simple linker-allocated GREG plus one explicit GREG.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7e8 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd00 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000002e 00007048 860f3a38 .*
--- /dev/null
+ .global y
+y LDA $33,y+8
--- /dev/null
+#source: start.s
+#source: greg-1.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Just a simple linker-allocated GREG plus one explicit GREG.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+fe g \*REG\* areg
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000002e 00007048 860f3a38 .*
+
--- /dev/null
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Just two BPO relocs merged as one linker-allocated GREG.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7f0 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+2000000000000000 g O \*ABS\* 0+ __bss_start
+0+8 g \.text 0+ y
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000010 .*
--- /dev/null
+ LDOU $121,_start+42+4+4+257
--- /dev/null
+#source: start.s
+#source: bpo-1.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Just two BPO relocs merged as one linker-allocated GREG.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+8 g \.text y
+
+Contents of section \.text:
+ 0000 e3fd0001 232afe1e 2321fe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 00000010 .*
--- /dev/null
+#source: start.s
+#source: greg-1.s
+#source: bpo-3.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Three GREGs: one explicit, two linker-allocated.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7e0 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+8 l \.text 0+ x
+0+ g \.text 0+ _start
+0+fe g \*REG\* 0+ areg
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 8f79fd00 232afc00 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00000032 00000000 00000133 .*
+ 07f0 00007048 860f3a38 .*
--- /dev/null
+ .set i,0
+ .rept 223
+ LDA $11,_start+i*256
+ .set i,i+1
+ .endr
--- /dev/null
+#source: start.s
+#source: greg-1.s
+#source: bpo-3.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Three GREGs: one explicit, two linker-allocated.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+fe g \*REG\* areg
+
+Contents of section \.text:
+ 0000 e3fd0001 8f79fd00 232afc00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e0 00000000 00000032 00000000 00000133 .*
+ 07f0 00007048 860f3a38 .*
--- /dev/null
+#source: start.s
+#source: bpo-1.s
+#source: bpo-3.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# Three linker-allocated GREGs: one eliminated.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7e8 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+4 l \.text 0+ x
+0+ g \.text 0+ _start
+2000000000000000 g O \*ABS\* 0+ __bss_start
+0+c g \.text 0+ y
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd1a 8f79fe00 2321fd00 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 00000014 00000000 00000133 .*
--- /dev/null
+# A section with a symbol and a BPO allocation.
+ .section .text.x,"ax",@progbits
+ .global x
+x LDA $45,x+4200
--- /dev/null
+#source: start.s
+#source: bpo-1.s
+#source: bpo-3.s
+#source: bpo-2.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# Three linker-allocated GREGs: one eliminated.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+0+c g \.text y
+
+Contents of section \.text:
+ 0000 e3fd0001 232afd1a 8f79fe00 2321fd00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 00000014 00000000 00000133 .*
--- /dev/null
+#source: start.s
+#source: bpo-4.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.text 0+
+2000000000000000 l d \.data 0+
+2000000000000000 l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+100 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+df l \*ABS\* 0+ i
+0+ g \.text 0+ _start
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+ g O \.text 0+ _start\.
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2100 230b2200 .*
+ 0010 230b2300 230b2400 230b2500 230b2600 .*
+#...
+ 0360 230bf700 230bf800 230bf900 230bfa00 .*
+ 0370 230bfb00 230bfc00 230bfd00 230bfe00 .*
+Contents of section \.data:
+Contents of section \.sbss:
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
--- /dev/null
+# A section with a symbol and a BPO allocation.
+ .section .text.x2,"ax",@progbits
+ .global x2
+x2 LDA $45,x2+42000
--- /dev/null
+#source: start.s
+#source: bpo-4.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#objdump: -st
+
+# 223 (max) linker-allocated GREGs.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+ g \.text _start
+
+Contents of section \.text:
+ 0000 e3fd0001 230b2000 230b2100 230b2200 .*
+ 0010 230b2300 230b2400 230b2500 230b2600 .*
+#...
+ 0360 230bf700 230bf800 230bf900 230bfa00 .*
+ 0370 230bfb00 230bfc00 230bfd00 230bfe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 0100 00000000 00000000 00000000 00000100 .*
+ 0110 00000000 00000200 00000000 00000300 .*
+#...
+ 07d0 00000000 0000da00 00000000 0000db00 .*
+ 07e0 00000000 0000dc00 00000000 0000dd00 .*
+ 07f0 00000000 0000de00 .*
--- /dev/null
+#source: start.s
+#source: bpo-4.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: Too many global registers: 224
--- /dev/null
+# If the symbol is a register then this is an error.
+ LDA $77,areg-5
--- /dev/null
+#source: start.s
+#source: bpo-4.s
+#source: greg-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: Too many global registers: 224
--- /dev/null
+#source: start.s
+#source: bpo-4.s
+#source: pad2p18m32.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix
+#error: Too many global registers: 224
--- /dev/null
+# A BPO and an ordinary reloc in the same section.
+ LDA $54,areg-8
+ .quad areg-4
--- /dev/null
+#source: start.s
+#source: bpo-4.s
+#source: pad2p18m32.s
+#source: bpo-1.s
+#as: -linker-allocated-gregs
+#ld: -m mmo
+#error: Too many global registers: 224
--- /dev/null
+#source: start3.s
+#source: bpo-6.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m elf64mmix --gc-sections
+#objdump: -st
+
+# Check that GC does not mess up things when no BPO:s are collected.
+
+.*: file format elf64-mmix
+
+SYMBOL TABLE:
+0+ l d \.init 0+
+0+10 l d \.text 0+
+20+ l d \.sbss 0+
+2000000000000000 l d \.bss 0+
+0+7e8 l d \.MMIX\.reg_contents 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l d \*ABS\* 0+
+0+ l \.init 0+ _start
+0+14 g \.text 0+ x
+0+10 g \.text 0+ x2
+2000000000000000 g O \*ABS\* 0+ __bss_start
+2000000000000000 g O \*ABS\* 0+ _edata
+2000000000000000 g O \*ABS\* 0+ _end
+0+10 g O \.text 0+ _start\.
+
+Contents of section \.init:
+ 0000 00000000 0000003d 00000000 0000003a .*
+Contents of section \.text:
+ 0010 232dfe00 232dfd00 .*
+Contents of section \.sbss:
+Contents of section \.bss:
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000107c 00000000 0000a420 .*
--- /dev/null
+#source: start3.s
+#source: bpo-6.s
+#source: bpo-5.s
+#as: -linker-allocated-gregs
+#ld: -m mmo --gc-sections
+#objdump: -st
+
+# Check that GC does not mess up things when no BPO:s are collected.
+# Note that mmo doesn't support GC at the moment; it's a nop.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ g \.text Main
+0+4 g \.text x
+0+ g \.text x2
+
+Contents of section \.text:
+ 0000 232dfe00 232dfd00 00000000 0000002d .*
+ 0010 00000000 0000002a .*
+Contents of section \.MMIX\.reg_contents:
+ 07e8 00000000 0000106c 00000000 0000a410 .*
--- /dev/null
+# When GC, all sections in each file must be referenced from within a kept
+# section.
+ .section .init,"ax",@progbits
+_start:
+ .quad x+41
+ .quad x2+42
+
--- /dev/null
+# When GC, all sections in each file must be referenced from within a kept
+# section (which .init is, which .text isn't). Here, we don't refer to
+# anything so whatever is linked will be discarded.
+ .section .init,"ax",@progbits
+_start:
+ SETL $119,1190