From: H.J. Lu Date: Wed, 3 Dec 2014 16:40:19 +0000 (-0800) Subject: Replace copyreloc-main.c with copyreloc-main.S X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=01bbed2a55655bb46b5fe1493f0c1a15dcf3a844;p=binutils-gdb.git 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. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 70201adffbb..2a06fa0bf49 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-12-03 H.J. Lu + + * 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 * 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 00000000000..cc17f0e4c76 --- /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 430eefb473c..00000000000 --- 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 91c9dd939c0..253f0c609cf 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" \ ] \