diff options
author | 2024-01-29 14:22:06 +0000 | |
---|---|---|
committer | 2024-01-29 14:22:06 +0000 | |
commit | a58dc5427f0a6b580e9a37a53399503325956f65 (patch) | |
tree | 41c12ff1db98256dff836a2592b3e0d353dfdd61 | |
parent | Updated French translations for GOLD and LD (diff) | |
download | binutils-gdb-a58dc5427f0a6b580e9a37a53399503325956f65.tar.gz binutils-gdb-a58dc5427f0a6b580e9a37a53399503325956f65.tar.bz2 binutils-gdb-a58dc5427f0a6b580e9a37a53399503325956f65.zip |
x86: testsuite: scfi: adjust COFI testcase and gas: scfi: untraceable control flow should be a hard error
-rw-r--r-- | gas/ginsn.c | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s | 24 | ||||
-rw-r--r-- | gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp | 3 |
6 files changed, 4 insertions, 37 deletions
diff --git a/gas/ginsn.c b/gas/ginsn.c index 5f6a67ce4f2..661f51d23c5 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; } diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d b/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d deleted file mode 100644 index 53cc124d860..00000000000 --- a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d +++ /dev/null @@ -1,5 +0,0 @@ -#as: --scfi=experimental -W -#objdump: -Wf -#name: Synthesize CFI for add insn - -#pass diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l b/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l deleted file mode 100644 index 61c29da2d9a..00000000000 --- a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.l +++ /dev/null @@ -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 diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s b/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s deleted file mode 100644 index 0ea32d4bbe6..00000000000 --- a/gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s +++ /dev/null @@ -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 diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l b/gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l index 1e138a102fe..c59ba93df45 100644 --- a/gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l +++ b/gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l @@ -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' diff --git a/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp b/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp index 2b291800b65..9005c47d789 100644 --- a/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp +++ b/gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp @@ -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" |