From 42cf184456fb1470835b6dccd536c2d74461e7b6 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 25 May 2020 17:27:49 +0200 Subject: [PATCH] [gdb/testsuite] Add comment in exec_is_pie Add comment to exec_is_pie explaining why readelf -d output is not used. gdb/testsuite/ChangeLog: 2020-05-25 Tom de Vries * lib/gdb.exp (exec_is_pie): Add comment. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/lib/gdb.exp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 91769e8adcc..201f2684a9c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-05-25 Tom de Vries + + * lib/gdb.exp (exec_is_pie): Add comment. + 2020-05-25 Tom de Vries * lib/jit-elf-helpers.exp (compile_and_download_n_jit_so): Use $f diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 7177be941b4..8e22941f0bc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5509,6 +5509,9 @@ proc exec_is_pie { executable } { return -1 } set readelf_program [gdb_find_readelf] + # We're not testing readelf -d | grep "FLAGS_1.*Flags:.*PIE" + # because the PIE flag is not set by all versions of gold, see PR + # binutils/26039. set res [catch {exec $readelf_program -h $executable} output] if { $res != 0 } { return -1 -- 2.30.2