summaryrefslogtreecommitdiff
path: root/ELF/Arch/ARM.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-24 01:00:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-24 01:00:50 +0000
commit0d9ba4fe26725cacc7253fc3c72c4574f26bc099 (patch)
tree90c426d54188ca226b29aaf8a308bba364a73d1a /ELF/Arch/ARM.cpp
parenteb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (diff)
Notes
Diffstat (limited to 'ELF/Arch/ARM.cpp')
-rw-r--r--ELF/Arch/ARM.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/ELF/Arch/ARM.cpp b/ELF/Arch/ARM.cpp
index 94a98e7679bdd..b9f551e4b3be8 100644
--- a/ELF/Arch/ARM.cpp
+++ b/ELF/Arch/ARM.cpp
@@ -37,8 +37,8 @@ public:
void writePltHeader(uint8_t *Buf) const override;
void writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr, uint64_t PltEntryAddr,
int32_t Index, unsigned RelOff) const override;
- void addPltSymbols(InputSectionBase *IS, uint64_t Off) const override;
- void addPltHeaderSymbols(InputSectionBase *ISD) const override;
+ void addPltSymbols(InputSection &IS, uint64_t Off) const override;
+ void addPltHeaderSymbols(InputSection &ISD) const override;
bool needsThunk(RelExpr Expr, RelType Type, const InputFile *File,
uint64_t BranchAddr, const Symbol &S) const override;
bool inBranchRange(RelType Type, uint64_t Src, uint64_t Dst) const override;
@@ -184,7 +184,7 @@ void ARM::writeIgotPlt(uint8_t *Buf, const Symbol &S) const {
write32le(Buf, S.getVA());
}
-// Long form PLT Heade that does not have any restrictions on the displacement
+// Long form PLT Header that does not have any restrictions on the displacement
// of the .plt from the .plt.got.
static void writePltHeaderLong(uint8_t *Buf) {
const uint8_t PltData[] = {
@@ -232,8 +232,7 @@ void ARM::writePltHeader(uint8_t *Buf) const {
write32le(Buf + 28, TrapInstr);
}
-void ARM::addPltHeaderSymbols(InputSectionBase *ISD) const {
- auto *IS = cast<InputSection>(ISD);
+void ARM::addPltHeaderSymbols(InputSection &IS) const {
addSyntheticLocal("$a", STT_NOTYPE, 0, 0, IS);
addSyntheticLocal("$d", STT_NOTYPE, 16, 0, IS);
}
@@ -282,8 +281,7 @@ void ARM::writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr,
write32le(Buf + 12, TrapInstr); // Pad to 16-byte boundary
}
-void ARM::addPltSymbols(InputSectionBase *ISD, uint64_t Off) const {
- auto *IS = cast<InputSection>(ISD);
+void ARM::addPltSymbols(InputSection &IS, uint64_t Off) const {
addSyntheticLocal("$a", STT_NOTYPE, Off, 0, IS);
addSyntheticLocal("$d", STT_NOTYPE, Off + 12, 0, IS);
}