mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
ld-elf/shared.exp mix_pic_and_non_pic
Tweaks to make it easier to re-run these testcases by hand. * testsuite/ld-elf/shared.exp (mix_pic_and_non_pic): Pass in exe name rather than constructing testname. Fix typo in sub-test name. Log copying. Use -rpath rather than -R.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2016-05-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* testsuite/ld-elf/shared.exp (mix_pic_and_non_pic): Pass in
|
||||||
|
exe name rather than constructing testname. Fix typo in
|
||||||
|
sub-test name. Log copying. Use -rpath rather than -R.
|
||||||
|
|
||||||
2016-05-18 Nick Clifton <nickc@redhat.com>
|
2016-05-18 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* scripttempl/ft32.sc: Use fixed constants for memory region
|
* scripttempl/ft32.sc: Use fixed constants for memory region
|
||||||
|
@ -607,12 +607,7 @@ if { [istarget *-*-linux*]
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc mix_pic_and_non_pic {xfails cflags ldflags} {
|
proc mix_pic_and_non_pic {xfails cflags ldflags exe} {
|
||||||
set testname "Mixing PIC and non-PIC"
|
|
||||||
if { ![ string match "" $cflags$ldflags] } {
|
|
||||||
set testname "$testname ($cflags $ldflags)"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_cc_link_tests [list \
|
run_cc_link_tests [list \
|
||||||
[list \
|
[list \
|
||||||
"Build libpr19719a.so" \
|
"Build libpr19719a.so" \
|
||||||
@ -631,7 +626,7 @@ proc mix_pic_and_non_pic {xfails cflags ldflags} {
|
|||||||
"libpr19719b.so" \
|
"libpr19719b.so" \
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build pr19073b.o" \
|
"Build libpr19719b.o" \
|
||||||
"-r -nostdlib" \
|
"-r -nostdlib" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ pr19719b.c } \
|
{ pr19719b.c } \
|
||||||
@ -640,33 +635,35 @@ proc mix_pic_and_non_pic {xfails cflags ldflags} {
|
|||||||
] \
|
] \
|
||||||
]
|
]
|
||||||
|
|
||||||
|
send_log "cp tmpdir/libpr19719b.so tmpdir/libpr19719.so\n"
|
||||||
exec cp tmpdir/libpr19719b.so tmpdir/libpr19719.so
|
exec cp tmpdir/libpr19719b.so tmpdir/libpr19719.so
|
||||||
|
|
||||||
run_ld_link_exec_tests [] [list \
|
run_ld_link_exec_tests [] [list \
|
||||||
[list \
|
[list \
|
||||||
"Run pr19719" \
|
"Run $exe fun defined" \
|
||||||
"$ldflags tmpdir/libpr19719b.o tmpdir/libpr19719.so -R tmpdir" \
|
"$ldflags tmpdir/libpr19719b.o tmpdir/libpr19719.so -rpath tmpdir" \
|
||||||
"" \
|
"" \
|
||||||
{ pr19719a.c pr19719c.c } \
|
{ pr19719a.c pr19719c.c } \
|
||||||
"pr19719" \
|
$exe \
|
||||||
"pass.out" \
|
"pass.out" \
|
||||||
"$cflags" \
|
"$cflags" \
|
||||||
] \
|
] \
|
||||||
]
|
]
|
||||||
|
|
||||||
|
send_log "cp tmpdir/libpr19719a.so tmpdir/libpr19719.so\n"
|
||||||
exec cp tmpdir/libpr19719a.so tmpdir/libpr19719.so
|
exec cp tmpdir/libpr19719a.so tmpdir/libpr19719.so
|
||||||
|
|
||||||
foreach targ $xfails {
|
foreach targ $xfails {
|
||||||
setup_xfail $targ
|
setup_xfail $targ
|
||||||
}
|
}
|
||||||
|
|
||||||
set exec_output [run_host_cmd tmpdir/pr19719 ""]
|
set exec_output [run_host_cmd "tmpdir/$exe" ""]
|
||||||
if {![string match "PASS" $exec_output]} {
|
if {![string match "PASS" $exec_output]} {
|
||||||
fail $testname
|
fail "Run $exe fun undefined"
|
||||||
} else {
|
} else {
|
||||||
pass $testname
|
pass "Run $exe fun undefined"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" ""
|
mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" "" "pr19719"
|
||||||
mix_pic_and_non_pic [] "-fPIE" "-pie"
|
mix_pic_and_non_pic [] "-fPIE" "-pie" "pr19719pie"
|
||||||
|
Reference in New Issue
Block a user