diff options
author | Tom de Vries <tdevries@suse.de> | 2019-08-05 12:51:58 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-08-05 12:51:58 +0200 |
commit | a80cf5d88e028fa6a72b37fe50795e70bb6e3559 (patch) | |
tree | 9059acdad2c515d5eaedb074a78e4df6faee0e5a /gas | |
parent | d09628385443574b556f2beaaba7588a2a5fb4c0 (diff) | |
download | gdb-a80cf5d88e028fa6a72b37fe50795e70bb6e3559.zip gdb-a80cf5d88e028fa6a72b37fe50795e70bb6e3559.tar.gz gdb-a80cf5d88e028fa6a72b37fe50795e70bb6e3559.tar.bz2 |
[gdb/testsuite] Fail in gdb_compile if pie results in non-PIE executable
When running gdb.base/break-idempotent.exp with
--target_board=unix/-fno-PIE/-no-pie, we get:
...
nr of expected passes 140
...
The test-case is compiled once with nopie and once with pie, but in both cases
we end up with a non-PIE executable. The "-fno-PIE -no-pie" options specified
using the target_board are interpreted by dejagnu as multilib_flags, and end up
overriding the pie flags.
Fix this by checking in gdb_compile if the resulting exec is non-PIE despite of
a pie setting, and if so return an error:
...
Running gdb/testsuite/gdb.base/break-idempotent.exp ...
gdb compile failed, pie failed to generate PIE executable
=== gdb Summary ===
nr of expected passes 70
nr of untested testcases 1
...
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-08-05 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (version_at_least): Factor out of ...
(tcl_version_at_least): ... here.
(gdb_compile): Fail if pie results in non-PIE executable.
(readelf_version, readelf_prints_pie): New proc.
(exec_is_pie): Return -1 if unknown.
Diffstat (limited to 'gas')
0 files changed, 0 insertions, 0 deletions