aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2022-06-08 09:54:08 -0400
committerJoseph Huber <jhuber6@vols.utk.edu>2022-06-08 09:56:51 -0400
commit9e0dbd2a2a4adee04b31e0cfa172fc36dd4ac313 (patch)
tree7821a2fa4dae75de038219d0d4949133222d7ec8 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent86a4c78047cefd98863d5c62992616a43a0240c0 (diff)
downloadllvm-9e0dbd2a2a4adee04b31e0cfa172fc36dd4ac313.zip
llvm-9e0dbd2a2a4adee04b31e0cfa172fc36dd4ac313.tar.gz
llvm-9e0dbd2a2a4adee04b31e0cfa172fc36dd4ac313.tar.bz2
[Target] Remove `startswith` for adding `SHF_EXCLUDE` to offload section
Summary: We use the special section name `.llvm.offloading` to store device imagees in the host object file. We want these to be stripped by the linker as they are not used after linking so we use the `SHF_EXCLUDE` flag to instruct the linker to drop them. We used to do this for all sections that started with `.llvm.offloading` when we encoded metadata in the section name itself. Now we embed a special binary containing the metadata, we should only add the flag on this name specifically.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index ed2a15d..ccbfc16 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -449,7 +449,7 @@ static SectionKind getELFKindForNamedSection(StringRef Name, SectionKind K) {
Name == ".llvmbc" || Name == ".llvmcmd")
return SectionKind::getMetadata();
- if (Name.startswith(".llvm.offloading"))
+ if (Name == ".llvm.offloading")
return SectionKind::getExclude();
if (Name.empty() || Name[0] != '.') return K;