[lld] [lld] Error on unsupported split stack (PR #88063)

Patrick O'Neill via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 8 15:55:47 PDT 2024


https://github.com/patrick-rivos created https://github.com/llvm/llvm-project/pull/88063

Targets with no `-fstack-split` support now emit `ld.lld: error: Target doesn't support split stacks.` instead of `UNREACHABLE executed` with a backtrace asking the user to report a bug.

Resolves #88061

>From 45e78c78ff1f443319dc7550a87e3c20ec65b7c9 Mon Sep 17 00:00:00 2001
From: Patrick O'Neill <102189596+patrick-rivos at users.noreply.github.com>
Date: Mon, 8 Apr 2024 15:54:46 -0700
Subject: [PATCH] [lld] Error on unsupported split stack

Targets with no `-fstack-split` support now emit `ld.lld: error: Target doesn't support split stacks.` instead of `UNREACHABLE executed` with a backtrace asking the user to report a bug.

Resolves #88061
---
 lld/ELF/Target.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index d879a427e9c096..735b2a82d851b4 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -141,7 +141,7 @@ bool TargetInfo::needsThunk(RelExpr expr, RelType type, const InputFile *file,
 
 bool TargetInfo::adjustPrologueForCrossSplitStack(uint8_t *loc, uint8_t *end,
                                                   uint8_t stOther) const {
-  llvm_unreachable("Target doesn't support split stacks.");
+  fatal("Target doesn't support split stacks.");
 }
 
 bool TargetInfo::inBranchRange(RelType type, uint64_t src, uint64_t dst) const {



More information about the llvm-commits mailing list