| Index: gdb/testsuite/gdb.base/attach-pie-misread.exp
|
| diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
|
| index 7a68c3393d66def92b4cd90f623be382d9d478d5..e7ff23146e63489ce6abd7b718703d0fadc71407 100644
|
| --- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
|
| +++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
|
| @@ -27,7 +27,7 @@ set genfile ${objdir}/${subdir}/${test}-gen.h
|
| set executable ${test}
|
| set binfile ${objdir}/${subdir}/${executable}
|
|
|
| -if {[build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE -pie"]] == ""} {
|
| +if {[build_executable_own_libs ${test}.exp $executable $srcfile [list additional_flags=-fPIE ldflags=-pie]] == ""} {
|
| return -1
|
| }
|
|
|
| @@ -97,7 +97,7 @@ if {$result == 0} {
|
| fail $test
|
| }
|
|
|
| -set prelink_args [build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE -pie -DGEN=\"$genfile\""]]
|
| +set prelink_args [build_executable_own_libs ${test}.exp $executable $srcfile [list "additional_flags=-fPIE -DGEN=\"$genfile\"" "ldflags=-pie"]]
|
| if {$prelink_args == ""} {
|
| return -1
|
| }
|
| @@ -152,9 +152,7 @@ gdb_expect {
|
| }
|
|
|
| # Due to alignments it was reproducible with 1 on x86_64 but 2 on i686.
|
| -foreach align_mult {1 2} {
|
| - set old_ldprefix $pf_prefix
|
| - lappend pf_prefix "shift-by-$align_mult:"
|
| +foreach align_mult {1 2} { with_test_prefix "shift-by-$align_mult" {
|
|
|
| # FIXME: We believe there is enough room under FIRST_OFFSET.
|
| set shifted_offset [format 0x%x [expr "$first_offset - $align_mult * $align_max"]]
|
| @@ -198,8 +196,6 @@ foreach align_mult {1 2} {
|
| }
|
|
|
| gdb_test "detach" "Detaching from program: .*"
|
| -
|
| - set pf_prefix $old_ldprefix
|
| -}
|
| +}}
|
|
|
| remote_exec host "kill -9 $pid"
|
|
|