2_23-branch'.
Cherrypick from master 2012-09-09 16:31:12 UTC Hans-Peter Nilsson <hp@axis.com> ' * ld-mmix/sec-1.d, ld-mmix/sec-3.d: Force end-of-section symbols':
ld/testsuite/ld-mmix/data-1.s
ld/testsuite/ld-mmix/orph-.d
ld/testsuite/ld-mmix/orph-awp.d
ld/testsuite/ld-mmix/orph-d-a.d
ld/testsuite/ld-mmix/orph-d-awn.d
ld/testsuite/ld-mmix/orph-d-awp.d
ld/testsuite/ld-mmix/orph-d-awpe.d
ld/testsuite/ld-mmix/orph-d.d
ld/testsuite/ld-mmix/orph-dc-ap.d
ld/testsuite/ld-mmix/orph-dc-awp.d
ld/testsuite/ld-mmix/orph-dc.d
ld/testsuite/ld-mmix/tm-ae.s
ld/testsuite/ld-mmix/tm-ape.s
ld/testsuite/ld-mmix/tm-awne.s
ld/testsuite/ld-mmix/tm-awpe.s
ld/testsuite/ld-mmix/tm-d-ap.s
ld/testsuite/ld-mmix/tm-d-awp.s
ld/testsuite/ld-mmix/tm-d.s
ld/testsuite/ld-mmix/tm-e.s
ld/testsuite/ld-mmix/tm-orph1.s
--- /dev/null
+ .data
+ OCTA #42
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: tm-orph1.s
+#source: tm-e.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# Like orph-d.d but without data.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 +g +\.text __etext
+0+ +g +\.text __TMC_END__
+20+ +g +\*ABS\* __Ebss
+20+ +g +\*ABS\* __Edata
+0+ +g +\.text _start
+20+ +g +\*ABS\* __Eall
+20+ +g +\*ABS\* __Sdata
+20+ +g +\*ABS\* __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section .MMIX.reg_contents:
+ 07f0 00000000 00000007 .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: tm-orph1.s
+#source: tm-awpe.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# Like orph-d-awp.d, but without .data contents.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 +g +\.text __etext
+20+ +g +\*ABS\* __TMC_END__
+20+ +g +\*ABS\* __Ebss
+20+ +g +\*ABS\* __Edata
+0+ +g +\.text _start
+20+ +g +\*ABS\* __Eall
+20+ +g +\*ABS\* __Sdata
+20+ +g +\*ABS\* __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 20000000 00000007 .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-ae.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# A section that's just allocated (but not writable and no @progbits).
+# Should attach to the .text section due to being read-only.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 +g +\.text __etext
+0+8 +g +\.text __TMC_END__
+20+8 +g +\.data __Ebss
+20+8 +g +\.data __Edata
+0+ +g +\.text _start
+20+8 +g +\.data __Eall
+20+ +g +\.data __Sdata
+20+8 +g +\.data __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000000f .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-awne.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# A section that's "aw",@nobits, i.e. naturally .bss.
+# Should attach to the .bss section (but we'll see it as attached to
+# .data).
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 +g +\.text __etext
+20+8 +g +\.data __TMC_END__
+20+8 +g +\.data __Ebss
+20+8 +g +\.data __Edata
+0+ +g +\.text _start
+20+8 +g +\.data __Eall
+20+ +g +\.data __Sdata
+20+8 +g +\.data __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 20000000 0000000f .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-awpe.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# An orphan section (.tm_clone_table) would attach after the register
+# section, and contents and symbols and related relocations would be
+# reduced to be relative to the register section, which is an error.
+# We check the original case ("aw",@progbits, to .data or .bss),
+# PR ld/1xxxx.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 +g +\.text __etext
+20+8 +g +\.data __TMC_END__
+20+8 +g +\.data __Ebss
+20+8 +g +\.data __Edata
+0+ +g +\.text _start
+20+8 +g +\.data __Eall
+20+ +g +\.data __Sdata
+20+8 +g +\.data __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 20000000 0000000f .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-d.s
+#source: tm-awpe.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#error: overlaps section .text
+
+# Like orph-d-awp.d but with contents in that section. Also, mismatching
+# section flags for the contents will cause a linker error, but we'll
+# call this a doctor-it-hurts situation; either list the section in
+# the linker script or have consistent section flags.
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-e.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# Like orph-d-awp.d but a section without specified flags; should
+# attach to .debug_info, i.e. have address 0.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 +g +\.text __etext
+0+ +g +\.text __TMC_END__
+20+8 +g +\.data __Ebss
+20+8 +g +\.data __Edata
+0+ +g +\.text _start
+20+8 +g +\.data __Eall
+20+ +g +\.data __Sdata
+20+8 +g +\.data __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section .MMIX.reg_contents:
+ 07f0 00000000 00000007 .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-d-ap.s
+#source: tm-ape.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# Like orph-d-a.d but with contents in that section (and with
+# @progbits, which doesn't reflect in flags), making sure it's really
+# treated as .text contents.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+18 +g +\*ABS\* __etext
+0+18 +g +\*ABS\* __TMC_END__
+20+8 +g +\.data __Ebss
+20+8 +g +\.data __Edata
+0+ +g +\.text _start
+20+8 +g +\.data __Eall
+20+ +g +\.data __Sdata
+20+8 +g +\.data __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.tm_clone_table:
+ 0008 000004d2 0000162e 008adf38 00c8860c .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 00000000 0000001f .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-d-awp.s
+#source: tm-awpe.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# Like orph-d-awp.d, but with contents in the extra section.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 g +\.text __etext
+2000000000000018 +g +\*ABS\* __TMC_END__
+2000000000000018 g +\*ABS\* __Ebss
+2000000000000018 g +\*ABS\* __Edata
+0+ g +\.text _start
+2000000000000018 g +\*ABS\* __Eall
+20+ g +.data __Sdata
+2000000000000018 g +\*ABS\* __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section \.tm_clone_table:
+ 2000000000000008 000004d2 0000162e 008adf38 00c8860c .*
+Contents of section \.MMIX\.reg_contents:
+ 07f0 20000000 0000001f .*
--- /dev/null
+#as: -linker-allocated-gregs
+#source: start.s
+#source: data-1.s
+#source: tm-orph1.s
+#source: tm-d.s
+#source: tm-e.s
+#ld: -m mmo -u __etext -u __Sdata -u __Edata -u __Sbss -u __Ebss -u __Eall
+#objdump: -rst
+
+# Like orph-d.d but with contents in the section without specified flags.
+
+.*: file format mmo
+
+SYMBOL TABLE:
+0+ +g +\.text Main
+0+8 g +.text __etext
+0+10 +g +\*ABS\* __TMC_END__
+2000000000000008 g +\.data __Ebss
+2000000000000008 g +\.data __Edata
+0+ +g +\.text _start
+2000000000000008 g +\.data __Eall
+2000000000000000 g +\.data __Sdata
+2000000000000008 g +\.data __Sbss
+
+Contents of section \.text:
+ 0000 e3fd0001 23fcfe00 .*
+Contents of section \.data:
+ 2000000000000004 00000042 .*
+Contents of section \.tm_clone_table:
+ 0000 000004d2 0000162e 008adf38 00c8860c .*
+Contents of section .MMIX.reg_contents:
+ 07f0 00000000 00000017 .*
--- /dev/null
+ .section .tm_clone_table,"a"
+ .global __TMC_END__
+__TMC_END__ IS @
--- /dev/null
+ .section .tm_clone_table,"a",@progbits
+ .global __TMC_END__
+__TMC_END__ IS @
--- /dev/null
+ .section .tm_clone_table,"aw",@nobits
+ .global __TMC_END__
+__TMC_END__ IS @
--- /dev/null
+ .section .tm_clone_table,"aw",@progbits
+ .global __TMC_END__
+__TMC_END__ IS @
--- /dev/null
+ .section .tm_clone_table,"a",@progbits
+ TETRA 1234,5678
+ TETRA 9101112,13141516
--- /dev/null
+ .section .tm_clone_table,"aw",@progbits
+ TETRA 1234,5678
+ TETRA 9101112,13141516
--- /dev/null
+ .section .tm_clone_table
+ TETRA 1234,5678
+ TETRA 9101112,13141516
--- /dev/null
+ .section .tm_clone_table
+ .global __TMC_END__
+__TMC_END__ IS @
--- /dev/null
+ .text
+f:
+ LDA $252,__TMC_END__+7