aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-12-03 08:40:19 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-12-03 08:52:00 -0800
commit01bbed2a55655bb46b5fe1493f0c1a15dcf3a844 (patch)
tree145291b5068a3b0842d9c81e7ebd722e0b2968ad
parentbee0ee850e846a8717b9aadb8d5da3adee3254ee (diff)
downloadgdb-01bbed2a55655bb46b5fe1493f0c1a15dcf3a844.zip
gdb-01bbed2a55655bb46b5fe1493f0c1a15dcf3a844.tar.gz
gdb-01bbed2a55655bb46b5fe1493f0c1a15dcf3a844.tar.bz2
Replace copyreloc-main.c with copyreloc-main.S
* ld-x86-64/copyreloc-main.c: Removed. * ld-x86-64/copyreloc-main.S: New. * ld-x86-64/x86-64.exp: Replace copyreloc-main.c with copyreloc-main.S.
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-x86-64/copyreloc-main.S15
-rw-r--r--ld/testsuite/ld-x86-64/copyreloc-main.c7
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp6
4 files changed, 25 insertions, 10 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 70201ad..2a06fa0 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2014-12-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-x86-64/copyreloc-main.c: Removed.
+ * ld-x86-64/copyreloc-main.S: New.
+ * ld-x86-64/x86-64.exp: Replace copyreloc-main.c with
+ copyreloc-main.S.
+
2014-12-02 H.J. Lu <hongjiu.lu@intel.com>
* ld-x86-64/copyreloc-lib.c: New file.
diff --git a/ld/testsuite/ld-x86-64/copyreloc-main.S b/ld/testsuite/ld-x86-64/copyreloc-main.S
new file mode 100644
index 0000000..cc17f0e
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/copyreloc-main.S
@@ -0,0 +1,15 @@
+ .section .text.startup,"ax",@progbits
+ .p2align 4,,15
+ .globl main
+ .type main, @function
+main:
+.LFB0:
+ .cfi_startproc
+ xorl %eax, %eax
+ cmpl $2, a_glob(%rip)
+ setne %al
+ ret
+ .cfi_endproc
+.LFE0:
+ .size main, .-main
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/copyreloc-main.c b/ld/testsuite/ld-x86-64/copyreloc-main.c
deleted file mode 100644
index 430eefb..0000000
--- a/ld/testsuite/ld-x86-64/copyreloc-main.c
+++ /dev/null
@@ -1,7 +0,0 @@
-extern int a_glob;
-
-int
-main (void)
-{
- return a_glob != 2;
-}
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 91c9dd9..253f0c6 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -404,7 +404,7 @@ if { [isnative] && [which $CC] != 0 } {
"Build copyreloc-main with PIE without -fPIE (1)" \
"tmpdir/copyreloc-lib.so -pie" \
"" \
- { copyreloc-main.c } \
+ { copyreloc-main.S } \
{{readelf {-Wr} copyreloc-main1.rd}} \
"copyreloc-main" \
] \
@@ -412,7 +412,7 @@ if { [isnative] && [which $CC] != 0 } {
"Build copyreloc-main with PIE without -fPIE (2)" \
"tmpdir/copyreloc-lib.so -pie" \
"" \
- { copyreloc-main.c } \
+ { copyreloc-main.S } \
{{readelf {-Wr} copyreloc-main2.rd}} \
"copyreloc-main" \
] \
@@ -442,7 +442,7 @@ if { [isnative] && [which $CC] != 0 } {
"Run copyreloc-main with PIE without -fPIE" \
"tmpdir/copyreloc-lib.so -pie" \
"" \
- { copyreloc-main.c } \
+ { copyreloc-main.S } \
"copyreloc-main" \
"copyreloc-main.out" \
] \