[lld] [lld] Elide __swift_FORCE_LOAD_$ dyld fixups in __DATA, __const (PR #214584)
Richard Howell via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 07:31:25 PDT 2026
================
@@ -0,0 +1,74 @@
+//===- ElideSwiftForceLoad.cpp --------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "ElideSwiftForceLoad.h"
+
+#include "Config.h"
+#include "InputSection.h"
+#include "OutputSegment.h"
+#include "Symbols.h"
+#include "Target.h"
+
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/TimeProfiler.h"
+
+using namespace llvm;
+using namespace lld;
+using namespace lld::macho;
+
+static constexpr StringRef forceLoadPrefix = "__swift_FORCE_LOAD_$_swift";
----------------
rmaz wrote:
I never considered third party autolinking. No reason we couldn't extend to cover that too.
https://github.com/llvm/llvm-project/pull/214584
More information about the llvm-commits
mailing list