diff options
author | Tom de Vries <tdevries@suse.de> | 2019-07-30 09:42:07 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-07-30 09:42:07 +0200 |
commit | b13057d9ceaa4944dc2d0ebf5df750d9350d0727 (patch) | |
tree | afd4cd01773acf58b8ef22f02e97ca0cf2413507 /gdb/python | |
parent | 34d5c40a07be4bc195d5ed9aecf4eb2faa1482bc (diff) | |
download | binutils-b13057d9ceaa4944dc2d0ebf5df750d9350d0727.zip binutils-b13057d9ceaa4944dc2d0ebf5df750d9350d0727.tar.gz binutils-b13057d9ceaa4944dc2d0ebf5df750d9350d0727.tar.bz2 |
[gdb/testsuite] Fail in gdb_compile if nopie results in PIE executable
When running gdb.base/dump.exp with --target_board=unix/-fPIE/-pie, we get:
...
Running gdb/testsuite/gdb.base/dump.exp ...
FAIL: gdb.base/dump.exp: dump array as value, intel hex
...
The FAIL happens because although the test specifies nopie, the exec is
in fact compiled as PIE. The "-fPIE -pie" options specified using the
target_board are interpreted by dejagnu as multilib_flags, and end up
overriding the nopie flags.
Fix this by checking in gdb_compile if the resulting exec is PIE despite of
a nopie setting, and if so return an error:
...
Running gdb/testsuite/gdb.base/dump.exp ...
gdb compile failed, nopie failed to prevent PIE executable
=== gdb Summary ===
nr of untested testcases 1
...
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-07-30 Tom de Vries <tdevries@suse.de>
PR testsuite/24834
* lib/gdb.exp (gdb_compile): Fail if nopie results in PIE executable.
(exec_is_pie): New proc.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions