[llvm] ae618d3 - [MC] Remove unused getMemtagRelocsSection
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 00:05:38 PDT 2024
Author: Fangrui Song
Date: 2024-10-23T00:05:32-07:00
New Revision: ae618d360456c5ccf6c8cf2294e708ac6625950e
URL: https://github.com/llvm/llvm-project/commit/ae618d360456c5ccf6c8cf2294e708ac6625950e
DIFF: https://github.com/llvm/llvm-project/commit/ae618d360456c5ccf6c8cf2294e708ac6625950e.diff
LOG: [MC] Remove unused getMemtagRelocsSection
Follow-up to fec1b6f9d3cf5347b67ffb2078c995eb496acf47
Added:
Modified:
llvm/include/llvm/MC/MCELFObjectWriter.h
llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCELFObjectWriter.h b/llvm/include/llvm/MC/MCELFObjectWriter.h
index b09e3bbffad329..3b7a0c8a702576 100644
--- a/llvm/include/llvm/MC/MCELFObjectWriter.h
+++ b/llvm/include/llvm/MC/MCELFObjectWriter.h
@@ -137,14 +137,6 @@ class MCELFObjectTargetWriter : public MCObjectTargetWriter {
unsigned setRSsym(unsigned Value, unsigned Type) const {
return (Type & R_SSYM_MASK) | ((Value & 0xff) << R_SSYM_SHIFT);
}
-
- // On AArch64, return a new section to be added to the ELF object that
- // contains relocations used to describe every symbol that should have memory
- // tags applied. Returns nullptr if no such section is necessary (i.e. there's
- // no tagged globals).
- virtual MCSectionELF *getMemtagRelocsSection(MCContext &Ctx) const {
- return nullptr;
- }
};
class ELFObjectWriter final : public MCObjectWriter {
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
index b4c5cde5fd888d..1a7a175404a64b 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
@@ -34,8 +34,6 @@ class AArch64ELFObjectWriter : public MCELFObjectTargetWriter {
~AArch64ELFObjectWriter() override = default;
- MCSectionELF *getMemtagRelocsSection(MCContext &Ctx) const override;
-
protected:
unsigned getRelocType(MCContext &Ctx, const MCValue &Target,
const MCFixup &Fixup, bool IsPCRel) const override;
@@ -462,12 +460,6 @@ bool AArch64ELFObjectWriter::needsRelocateWithSymbol(const MCValue &Val,
return (Val.getRefKind() & AArch64MCExpr::VK_GOT) == AArch64MCExpr::VK_GOT;
}
-MCSectionELF *
-AArch64ELFObjectWriter::getMemtagRelocsSection(MCContext &Ctx) const {
- return Ctx.getELFSection(".memtag.globals.static",
- ELF::SHT_AARCH64_MEMTAG_GLOBALS_STATIC, 0);
-}
-
std::unique_ptr<MCObjectTargetWriter>
llvm::createAArch64ELFObjectWriter(uint8_t OSABI, bool IsILP32) {
return std::make_unique<AArch64ELFObjectWriter>(OSABI, IsILP32);
More information about the llvm-commits
mailing list