This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][gdb/testsuite] Fail in gdb_compile if nopie results in PIE executable
- From: Pedro Alves <palves at redhat dot com>
- To: Tom de Vries <tdevries at suse dot de>, gdb-patches at sourceware dot org
- Date: Fri, 16 Aug 2019 19:48:56 +0100
- Subject: Re: [PATCH][gdb/testsuite] Fail in gdb_compile if nopie results in PIE executable
- References: <20190723072210.GA24180@delia>
On 7/23/19 8:22 AM, Tom de Vries wrote:
> 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.
I'd think it would be better to temporarily strip out -fPIE/-pie (*)
from multilib_flags if nopie is set?
(*) - and/or the contents of gdb,pie_ldflag gdb,pie_flag.
Thanks,
Pedro Alves