2222#include " llvm/Support/Parallel.h"
2323#include " llvm/Support/Path.h"
2424#include " llvm/Support/TimeProfiler.h"
25- #undef in
2625#if LLVM_ENABLE_ZLIB
2726// Avoid introducing max as a macro from Windows headers.
2827#define NOMINMAX
@@ -585,15 +584,15 @@ void OutputSection::writeTo(uint8_t *buf, parallel::TaskGroup &tg) {
585584static void finalizeShtGroup (OutputSection *os, InputSection *section) {
586585 // sh_link field for SHT_GROUP sections should contain the section index of
587586 // the symbol table.
588- os->link = ctx. sec .symTab ->getParent ()->sectionIndex ;
587+ os->link = in .symTab ->getParent ()->sectionIndex ;
589588
590589 if (!section)
591590 return ;
592591
593592 // sh_info then contain index of an entry in symbol table section which
594593 // provides signature of the section group.
595594 ArrayRef<Symbol *> symbols = section->file ->getSymbols ();
596- os->info = ctx. sec .symTab ->getSymbolIndex (*symbols[section->info ]);
595+ os->info = in .symTab ->getSymbolIndex (*symbols[section->info ]);
597596
598597 // Some group members may be combined or discarded, so we need to compute the
599598 // new size. The content will be rewritten in InputSection::copyShtGroup.
@@ -611,7 +610,7 @@ encodeOneCrel(raw_svector_ostream &os, Elf_Crel<sizeof(uint) == 8> &out,
611610 uint offset, const Symbol &sym, uint32_t type, uint addend) {
612611 const auto deltaOffset = static_cast <uint64_t >(offset - out.r_offset );
613612 out.r_offset = offset;
614- int64_t symidx = ctx. sec .symTab ->getSymbolIndex (sym);
613+ int64_t symidx = in .symTab ->getSymbolIndex (sym);
615614 if (sym.type == STT_SECTION) {
616615 auto *d = dyn_cast<Defined>(&sym);
617616 if (d) {
@@ -732,7 +731,7 @@ void OutputSection::finalize() {
732731 if (!first || isa<SyntheticSection>(first))
733732 return ;
734733
735- link = ctx. sec .symTab ->getParent ()->sectionIndex ;
734+ link = in .symTab ->getParent ()->sectionIndex ;
736735 // sh_info for SHT_REL[A] sections should contain the section header index of
737736 // the section to which the relocation applies.
738737 InputSectionBase *s = first->getRelocatedSection ();
@@ -882,8 +881,8 @@ void OutputSection::checkDynRelAddends(const uint8_t *bufStart) {
882881 // Some targets have NOBITS synthetic sections with dynamic relocations
883882 // with non-zero addends. Skip such sections.
884883 if (is_contained ({EM_PPC, EM_PPC64}, config->emachine ) &&
885- (rel.inputSec == ctx. sec .ppc64LongBranchTarget .get () ||
886- rel.inputSec == ctx. sec .igotPlt .get ()))
884+ (rel.inputSec == in .ppc64LongBranchTarget .get () ||
885+ rel.inputSec == in .igotPlt .get ()))
887886 continue ;
888887 const uint8_t *relocTarget =
889888 bufStart + relOsec->offset + rel.inputSec ->getOffset (rel.offsetInSec );
0 commit comments