x86: testsuite: scfi: adjust COFI testcase and gas: scfi: untraceable control flow should be a hard error
This commit is contained in:
committed by
Nick Clifton
parent
e1106084f6
commit
a58dc5427f
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#as: --scfi=experimental -W
|
||||
#objdump: -Wf
|
||||
#name: Synthesize CFI for add insn
|
||||
|
||||
#pass
|
||||
@@ -1,3 +0,0 @@
|
||||
.*Assembler messages:
|
||||
.*12: Warning: SCFI ignores most user-specified CFI directives
|
||||
.*24: Warning: Untraceable control flow for func 'foo'; Skipping SCFI
|
||||
@@ -1,24 +0,0 @@
|
||||
# Testcase with a variety of "change of flow instructions"
|
||||
#
|
||||
# Must be run with -W so it remains warning free.
|
||||
#
|
||||
# This test does not have much going on wrt synthesis of CFI;
|
||||
# it just aims to ensure x8_64 -> ginsn decoding behaves
|
||||
# gracefully for these "change of flow instructions"
|
||||
.text
|
||||
.globl foo
|
||||
.type foo, @function
|
||||
foo:
|
||||
.cfi_startproc
|
||||
addq %rdx, %rax
|
||||
loop foo
|
||||
notrack jmp *%rax
|
||||
call *%r8
|
||||
jecxz .L179
|
||||
jmp *48(%rdi)
|
||||
jo .L179
|
||||
.L179:
|
||||
ret
|
||||
.cfi_endproc
|
||||
.LFE0:
|
||||
.size foo, .-foo
|
||||
@@ -1,3 +1,3 @@
|
||||
.*Assembler messages:
|
||||
.*50: Warning: SCFI ignores most user-specified CFI directives
|
||||
.*52: Warning: Untraceable control flow for func 'foo'; Skipping SCFI
|
||||
.*52: Error: untraceable control flow for func 'foo'
|
||||
|
||||
@@ -28,6 +28,7 @@ if { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {
|
||||
run_list_test "ginsn-add-1" "--scfi=experimental -ali"
|
||||
run_list_test "ginsn-pop-1" "--scfi=experimental -ali"
|
||||
run_list_test "ginsn-push-1" "--scfi=experimental -ali"
|
||||
run_list_test "ginsn-cofi-1" "--scfi=experimental -ali -W"
|
||||
|
||||
run_dump_test "scfi-cfi-label-1"
|
||||
run_list_test "scfi-cfi-label-1" "--scfi=experimental --warn"
|
||||
@@ -67,8 +68,6 @@ if { ([istarget "x86_64-*-*"] && ![istarget "x86_64-*-linux*-gnux32"]) } then {
|
||||
run_dump_test "scfi-pushsection-2"
|
||||
run_list_test "scfi-pushsection-2" "--scfi=experimental --warn"
|
||||
|
||||
run_dump_test "scfi-cofi-1"
|
||||
run_list_test "scfi-cofi-1" "--scfi=experimental --warn"
|
||||
run_dump_test "scfi-sub-1"
|
||||
run_list_test "scfi-sub-1" "--scfi=experimental --warn"
|
||||
run_dump_test "scfi-sub-2"
|
||||
|
||||
Reference in New Issue
Block a user