ld-linkonce test
authorAlan Modra <amodra@gmail.com>
Mon, 15 Jun 2020 02:38:33 +0000 (12:08 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 15 Jun 2020 02:38:33 +0000 (12:08 +0930)
* testsuite/ld-linkonce/zeroeh_x.s: Rename from x.s.
* testsuite/ld-linkonce/zeroeh_y.s: Rename from y.s.
* testsuite/ld-linkonce/zeroehl32.d: Adjust for renaming.  Support
big-endian output.  Run for powerpc.

ld/ChangeLog
ld/testsuite/ld-linkonce/x.s [deleted file]
ld/testsuite/ld-linkonce/y.s [deleted file]
ld/testsuite/ld-linkonce/zeroeh_x.s [new file with mode: 0644]
ld/testsuite/ld-linkonce/zeroeh_y.s [new file with mode: 0644]
ld/testsuite/ld-linkonce/zeroehl32.d

index 2a6f1b5489dab33b605e2f2ff55be5518a0597e4..6aeafe69d76c16caae0625f4e9d2877dbe371abf 100644 (file)
@@ -1,3 +1,10 @@
+2020-06-15  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-linkonce/zeroeh_x.s: Rename from x.s.
+       * testsuite/ld-linkonce/zeroeh_y.s: Rename from y.s.
+       * testsuite/ld-linkonce/zeroehl32.d: Adjust for renaming.  Support
+       big-endian output.  Run for powerpc.
+
 2020-06-11  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-plugin/lto.exp (lto_link_tests): Move lto-6,
diff --git a/ld/testsuite/ld-linkonce/x.s b/ld/testsuite/ld-linkonce/x.s
deleted file mode 100644 (file)
index d07f73e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-;# Main file, x.s, with the program (_start) referring to two
-;# linkonce functions fn and fn2.  The functions fn and fn2 are
-;# supposed to be equivalent of C++ template instantiations; the
-;# main file instantiates fn.
-
- .text
- .global _start
-_start:
- .long fn
- .long fn2
-
- .section .gnu.linkonce.t.fn,"ax",@progbits
- .weak fn
- .type fn,@function
-fn:
-.La:
- .long 1
- .long 2
-.Lb:
- .size fn,.Lb-.La
-
- .section .gcc_except_table,"aw",@progbits
- .long 2
- .long .La
- .long .Lb-.La
-
- .section .eh_frame,"aw",@progbits
-.Lframe1:
- .long .LECIE1-.LSCIE1
-.LSCIE1:
- .long 0x0
- .byte 0x1
- .byte 0
- .uleb128 0x1
- .sleb128 -4
- .byte 0
- .p2align 2
-.LECIE1:
-
-.LSFDE1:
- .long .LEFDE1-.LASFDE1
-.LASFDE1:
- .long .LASFDE1-.Lframe1
- .long .La
- .long .Lb-.La
- .p2align 2
-.LEFDE1:
diff --git a/ld/testsuite/ld-linkonce/y.s b/ld/testsuite/ld-linkonce/y.s
deleted file mode 100644 (file)
index c1eb511..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-;# Library file y.s has linkonce entries for fn and fn2.  Note
-;# that this version of fn has different code, as if compiled
-;# with different optimization flags than the one in x.s (not
-;# important for this test, though).  The reference from
-;# .gcc_except_table to the linkonce-excluded fn2 must be zero, or g++
-;# EH will not work.
-
- .section .gnu.linkonce.t.fn2,"ax",@progbits
- .weak fn2
- .type fn2,@function
-fn2:
-.Lc:
- .long 3
-.Ld:
- .size fn2,.Ld-.Lc
-
- .section .gnu.linkonce.t.fn,"ax",@progbits
- .weak fn
- .type fn,@function
-fn:
-.Le:
- .long 4
-.Lf:
- .size fn,.Lf-.Le
-
- .section .gcc_except_table,"aw",@progbits
- .long 7
- .long .Lc
- .long .Ld-.Lc
-
- .long 0x6066
- .long .Le
- .long .Lf-.Le
-
- .section .eh_frame,"aw",@progbits
-.Lframe1:
- .long .LECIE1-.LSCIE1
-.LSCIE1:
- .long 0x0
- .byte 0x1
- .byte 0
- .uleb128 0x1
- .sleb128 -4
- .byte 0
- .p2align 2
-.LECIE1:
-
-.LSFDE1:
- .long .LEFDE1-.LASFDE1
-.LASFDE1:
- .long .LASFDE1-.Lframe1
- .long .Lc
- .long .Ld-.Lc
- .p2align 2
-.LEFDE1:
-
-.LSFDE2:
- .long .LEFDE2-.LASFDE2
-.LASFDE2:
- .long .LASFDE2-.Lframe1
- .long .Le
- .long .Lf-.Le
- .p2align 2
-.LEFDE2:
diff --git a/ld/testsuite/ld-linkonce/zeroeh_x.s b/ld/testsuite/ld-linkonce/zeroeh_x.s
new file mode 100644 (file)
index 0000000..d07f73e
--- /dev/null
@@ -0,0 +1,47 @@
+;# Main file, x.s, with the program (_start) referring to two
+;# linkonce functions fn and fn2.  The functions fn and fn2 are
+;# supposed to be equivalent of C++ template instantiations; the
+;# main file instantiates fn.
+
+ .text
+ .global _start
+_start:
+ .long fn
+ .long fn2
+
+ .section .gnu.linkonce.t.fn,"ax",@progbits
+ .weak fn
+ .type fn,@function
+fn:
+.La:
+ .long 1
+ .long 2
+.Lb:
+ .size fn,.Lb-.La
+
+ .section .gcc_except_table,"aw",@progbits
+ .long 2
+ .long .La
+ .long .Lb-.La
+
+ .section .eh_frame,"aw",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+ .byte 0
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0
+ .p2align 2
+.LECIE1:
+
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1
+.LASFDE1:
+ .long .LASFDE1-.Lframe1
+ .long .La
+ .long .Lb-.La
+ .p2align 2
+.LEFDE1:
diff --git a/ld/testsuite/ld-linkonce/zeroeh_y.s b/ld/testsuite/ld-linkonce/zeroeh_y.s
new file mode 100644 (file)
index 0000000..c1eb511
--- /dev/null
@@ -0,0 +1,64 @@
+;# Library file y.s has linkonce entries for fn and fn2.  Note
+;# that this version of fn has different code, as if compiled
+;# with different optimization flags than the one in x.s (not
+;# important for this test, though).  The reference from
+;# .gcc_except_table to the linkonce-excluded fn2 must be zero, or g++
+;# EH will not work.
+
+ .section .gnu.linkonce.t.fn2,"ax",@progbits
+ .weak fn2
+ .type fn2,@function
+fn2:
+.Lc:
+ .long 3
+.Ld:
+ .size fn2,.Ld-.Lc
+
+ .section .gnu.linkonce.t.fn,"ax",@progbits
+ .weak fn
+ .type fn,@function
+fn:
+.Le:
+ .long 4
+.Lf:
+ .size fn,.Lf-.Le
+
+ .section .gcc_except_table,"aw",@progbits
+ .long 7
+ .long .Lc
+ .long .Ld-.Lc
+
+ .long 0x6066
+ .long .Le
+ .long .Lf-.Le
+
+ .section .eh_frame,"aw",@progbits
+.Lframe1:
+ .long .LECIE1-.LSCIE1
+.LSCIE1:
+ .long 0x0
+ .byte 0x1
+ .byte 0
+ .uleb128 0x1
+ .sleb128 -4
+ .byte 0
+ .p2align 2
+.LECIE1:
+
+.LSFDE1:
+ .long .LEFDE1-.LASFDE1
+.LASFDE1:
+ .long .LASFDE1-.Lframe1
+ .long .Lc
+ .long .Ld-.Lc
+ .p2align 2
+.LEFDE1:
+
+.LSFDE2:
+ .long .LEFDE2-.LASFDE2
+.LASFDE2:
+ .long .LASFDE2-.Lframe1
+ .long .Le
+ .long .Lf-.Le
+ .p2align 2
+.LEFDE2:
index bd8fc6f67ea65a0ce4bb12c6080cae98416e3bb0..3aa73c98e77d1eed490b06b5ab9c955fbed5e35f 100644 (file)
@@ -1,21 +1,22 @@
-#source: x.s
-#source: y.s
+#source: zeroeh_x.s
+#source: zeroeh_y.s
 #ld: -Ttext 0xa00 -T zeroeh.ld
 #objdump: -s
 #target: cris-*-elf cris-*-linux* i?86-*-elf i?86-*-linux* i?86-*-gnu*
+#target: powerpc-*-elf powerpc-*-linux*
 
 # The word at address 201c, for the linkonce-excluded section, must be zero.
 
 .*:     file format elf32.*
 
 Contents of section \.text:
- 0a00 080a0000 100a0000 01000000 02000000  .*
- 0a10 03000000                             .*
+ 0a00 (00000a08 00000a10 00000001 00000002|080a0000 100a0000 01000000 02000000)  .*
+ 0a10 (00000003|03000000)  .*
 Contents of section \.gcc_except_table:
- 2000 02000000 080a0000 08000000 07000000  .*
- 2010 100a0000 04000000 66600000 00000000  .*
- 2020 04000000                             .*
+ 2000 (00000002 00000a08 00000008 00000007|02000000 080a0000 08000000 07000000)  .*
+ 2010 (00000a10 00000004 00006066 00000000|100a0000 04000000 66600000 00000000)  .*
+ 2020 (00000004|04000000)  .*
 Contents of section \.eh_frame:
- 4000 0c000000 00000000 0100017c 00000000  .*
- 4010 0c000000 14000000 080a0000 08000000  .*
- 4020 0c000000 24000000 100a0000 04000000  .*
+ 4000 (0000000c 00000000 0100017c 00000000|0c000000 00000000 0100017c 00000000)  .*
+ 4010 (0000000c 00000014 00000a08 00000008|0c000000 14000000 080a0000 08000000)  .*
+ 4020 (0000000c 00000024 00000a10 00000004|0c000000 24000000 100a0000 04000000)  .*
This page took 0.029018 seconds and 4 git commands to generate.