diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/testsuite/lib/binutils-common.exp | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 64fdaea..3cd5095 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2020-04-30 Nick Clifton <nickc@redhat.com> + + * testsuite/lib/binutils-common.exp (check_pie_support): New + proc. + 2020-04-29 Andrew Burgess <andrew.burgess@embecosm.com> * dwarf.c (display_debug_ranges): Ignore duplicate entries in diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 08dcc4d..b9e3c6d 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -291,6 +291,23 @@ proc check_shared_lib_support { } { return $shared_available_saved } +# Returns true if -pie is supported on the target + +proc check_pie_support { } { + global pie_available_saved + global ld + + if {![info exists pie_available_saved]} { + set ld_output [remote_exec host $ld "-pie"] + if { [ string first "not supported" $ld_output ] >= 0 } { + set pie_available_saved 0 + } else { + set pie_available_saved 1 + } + } + return $pie_available_saved +} + # Compare two files line-by-line. FILE_1 is the actual output and FILE_2 # is the expected output. Ignore blank lines in either file. # |