diff options
author | Fangrui Song <i@maskray.me> | 2021-12-22 21:09:57 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-12-22 21:09:57 -0800 |
commit | 5c75cc51b339e9c742ff5d1e88e330cdec88c983 (patch) | |
tree | d370585affbfa44a28dabdf65009a458d7a26a37 /lld/ELF/SyntheticSections.cpp | |
parent | baa3eb0dd9ac788d3decf33bb17bd552b59af19d (diff) | |
download | llvm-5c75cc51b339e9c742ff5d1e88e330cdec88c983.zip llvm-5c75cc51b339e9c742ff5d1e88e330cdec88c983.tar.gz llvm-5c75cc51b339e9c742ff5d1e88e330cdec88c983.tar.bz2 |
[ELF] Change nonnull pointer parameters to references. NFC
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 9691bac..def06da2 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1007,14 +1007,14 @@ void MipsGotSection::build() { // thread-locals that have been marked as local through a linker script) if (!s->isPreemptible && !config->shared) continue; - mainPart->relaDyn->addSymbolReloc(target->tlsModuleIndexRel, this, + mainPart->relaDyn->addSymbolReloc(target->tlsModuleIndexRel, *this, offset, *s); // However, we can skip writing the TLS offset reloc for non-preemptible // symbols since it is known even in shared libraries if (!s->isPreemptible) continue; offset += config->wordsize; - mainPart->relaDyn->addSymbolReloc(target->tlsOffsetRel, this, offset, + mainPart->relaDyn->addSymbolReloc(target->tlsOffsetRel, *this, offset, *s); } } @@ -1027,7 +1027,7 @@ void MipsGotSection::build() { // Dynamic relocations for "global" entries. for (const std::pair<Symbol *, size_t> &p : got.global) { uint64_t offset = p.second * config->wordsize; - mainPart->relaDyn->addSymbolReloc(target->relativeRel, this, offset, + mainPart->relaDyn->addSymbolReloc(target->relativeRel, *this, offset, *p.first); } if (!config->isPic) @@ -1573,12 +1573,12 @@ RelocationBaseSection::RelocationBaseSection(StringRef name, uint32_t type, dynamicTag(dynamicTag), sizeDynamicTag(sizeDynamicTag) {} void RelocationBaseSection::addSymbolReloc(RelType dynType, - InputSectionBase *isec, + InputSectionBase &isec, uint64_t offsetInSec, Symbol &sym, int64_t addend, Optional<RelType> addendRelType) { - addReloc(DynamicReloc::AgainstSymbol, dynType, isec, offsetInSec, sym, addend, - R_ADDEND, addendRelType ? *addendRelType : target->noneRel); + addReloc(DynamicReloc::AgainstSymbol, dynType, &isec, offsetInSec, sym, + addend, R_ADDEND, addendRelType ? *addendRelType : target->noneRel); } void RelocationBaseSection::addRelativeReloc( |