[llvm-branch-commits] [lld] ELF: Only rewrite non-preemptible IFUNCs to IPLT functions if a non-IRELATIVE relocation is needed. (PR #133531)
Peter Collingbourne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 10 15:55:02 PDT 2025
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/133531
>From 96e7da9a083888683c2ba00d97f886fd748ea10b Mon Sep 17 00:00:00 2001
From: Peter Collingbourne <pcc at google.com>
Date: Wed, 9 Apr 2025 20:30:57 -0700
Subject: [PATCH] Undo unnecessary change
Created using spr 1.3.6-beta.1
---
lld/ELF/SyntheticSections.cpp | 2 +-
lld/ELF/SyntheticSections.h | 2 +-
lld/ELF/Writer.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 8cab71c4c8d94..106749e90a82b 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1696,7 +1696,7 @@ void RelocationBaseSection::addAddendOnlyRelocIfNonPreemptible(
sym, 0, R_ABS, addendRelType);
}
-void RelocationBaseSection::mergeRels(Ctx &ctx) {
+void RelocationBaseSection::mergeRels() {
size_t newSize = relocs.size();
for (const auto &v : relocsVec)
newSize += v.size();
diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h
index 7a85906e8601d..2dd4b80eb85bf 100644
--- a/lld/ELF/SyntheticSections.h
+++ b/lld/ELF/SyntheticSections.h
@@ -553,7 +553,7 @@ class RelocationBaseSection : public SyntheticSection {
}
size_t getSize() const override { return relocs.size() * this->entsize; }
size_t getRelativeRelocCount() const { return numRelativeRelocs; }
- void mergeRels(Ctx &ctx);
+ void mergeRels();
void partitionRels();
void finalizeContents() override;
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 67004055f1af5..28b24f90716b8 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -2076,7 +2076,7 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
// symbol table section (dynSymTab) must be the first one.
for (Partition &part : ctx.partitions) {
if (part.relaDyn) {
- part.relaDyn->mergeRels(ctx);
+ part.relaDyn->mergeRels();
// Compute DT_RELACOUNT to be used by part.dynamic.
part.relaDyn->partitionRels();
finalizeSynthetic(ctx, part.relaDyn.get());
More information about the llvm-branch-commits
mailing list