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.
This commit is contained in:
H.J. Lu
2014-12-03 08:40:19 -08:00
parent bee0ee850e
commit 01bbed2a55
4 changed files with 25 additions and 10 deletions

View File

@ -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.

View File

@ -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

View File

@ -1,7 +0,0 @@
extern int a_glob;
int
main (void)
{
return a_glob != 2;
}

View File

@ -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" \
] \