aboutsummaryrefslogtreecommitdiff
path: root/gas/ginsn.c
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2024-01-26 10:30:18 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2024-01-26 11:31:35 -0800
commit91cdbed4d7b3acff951e0f21008a7775a7f23c20 (patch)
treef8f20ce690cad902b14618b4f42c8ebe981d6534 /gas/ginsn.c
parent16cbeae1b2757dd661ef936a505c6b3818a52853 (diff)
downloadgdb-91cdbed4d7b3acff951e0f21008a7775a7f23c20.zip
gdb-91cdbed4d7b3acff951e0f21008a7775a7f23c20.tar.gz
gdb-91cdbed4d7b3acff951e0f21008a7775a7f23c20.tar.bz2
gas: scfi: untraceable control flow should be a hard error
PR gas/31284 Currently, if an indirect jump is seen, GCFG (a CFG of ginsns) cannot be created, and the SCFI machinery bails out with a warning: "Warning: Untraceable control flow for func 'foo'; Skipping SCFI" It is, however, better suited if this is a hard error. Change it to a hard error. Also change the message to skip mentioning "SCFI", because the error itself may also useful when ginsns are used for other passes (distinct from SCFI) involving GCFG, like a pass to detect if there is unreachable code. Hence, simply say: "Error: untraceable control flow for func 'foo'" gas/ PR gas/31284 * ginsn.c (ginsn_data_end): Use as_bad instead of as_warn. gas/testsuite/ PR gas/31284 * gas/scfi/x86_64/ginsn-cofi-1.l: Adjust to the expected output in case of errors. * gas/scfi/x86_64/scfi-unsupported-cfg-1.l: Error not Warning.
Diffstat (limited to 'gas/ginsn.c')
-rw-r--r--gas/ginsn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/ginsn.c b/gas/ginsn.c
index 5f6a67c..661f51d 100644
--- a/gas/ginsn.c
+++ b/gas/ginsn.c
@@ -1161,8 +1161,8 @@ ginsn_data_end (const symbolS *label)
/* Build the cfg of ginsn(s) of the function. */
if (!frchain_now->frch_ginsn_data->gcfg_apt_p)
{
- as_warn (_("Untraceable control flow for func '%s'; Skipping SCFI"),
- S_GET_NAME (func));
+ as_bad (_("untraceable control flow for func '%s'"),
+ S_GET_NAME (func));
goto end;
}