2222#include " llvm/Support/Parallel.h"
2323#include " llvm/Support/Path.h"
2424#include " llvm/Support/TimeProfiler.h"
25+ #undef in
2526#if LLVM_ENABLE_ZLIB
2627// Avoid introducing max as a macro from Windows headers.
2728#define NOMINMAX
@@ -584,15 +585,15 @@ void OutputSection::writeTo(uint8_t *buf, parallel::TaskGroup &tg) {
584585static void finalizeShtGroup (OutputSection *os, InputSection *section) {
585586 // sh_link field for SHT_GROUP sections should contain the section index of
586587 // the symbol table.
587- os->link = in .symTab ->getParent ()->sectionIndex ;
588+ os->link = ctx. sec .symTab ->getParent ()->sectionIndex ;
588589
589590 if (!section)
590591 return ;
591592
592593 // sh_info then contain index of an entry in symbol table section which
593594 // provides signature of the section group.
594595 ArrayRef<Symbol *> symbols = section->file ->getSymbols ();
595- os->info = in .symTab ->getSymbolIndex (*symbols[section->info ]);
596+ os->info = ctx. sec .symTab ->getSymbolIndex (*symbols[section->info ]);
596597
597598 // Some group members may be combined or discarded, so we need to compute the
598599 // new size. The content will be rewritten in InputSection::copyShtGroup.
@@ -610,7 +611,7 @@ encodeOneCrel(raw_svector_ostream &os, Elf_Crel<sizeof(uint) == 8> &out,
610611 uint offset, const Symbol &sym, uint32_t type, uint addend) {
611612 const auto deltaOffset = static_cast <uint64_t >(offset - out.r_offset );
612613 out.r_offset = offset;
613- int64_t symidx = in .symTab ->getSymbolIndex (sym);
614+ int64_t symidx = ctx. sec .symTab ->getSymbolIndex (sym);
614615 if (sym.type == STT_SECTION) {
615616 auto *d = dyn_cast<Defined>(&sym);
616617 if (d) {
@@ -731,7 +732,7 @@ void OutputSection::finalize() {
731732 if (!first || isa<SyntheticSection>(first))
732733 return ;
733734
734- link = in .symTab ->getParent ()->sectionIndex ;
735+ link = ctx. sec .symTab ->getParent ()->sectionIndex ;
735736 // sh_info for SHT_REL[A] sections should contain the section header index of
736737 // the section to which the relocation applies.
737738 InputSectionBase *s = first->getRelocatedSection ();
@@ -881,8 +882,8 @@ void OutputSection::checkDynRelAddends(const uint8_t *bufStart) {
881882 // Some targets have NOBITS synthetic sections with dynamic relocations
882883 // with non-zero addends. Skip such sections.
883884 if (is_contained ({EM_PPC, EM_PPC64}, config->emachine ) &&
884- (rel.inputSec == in .ppc64LongBranchTarget .get () ||
885- rel.inputSec == in .igotPlt .get ()))
885+ (rel.inputSec == ctx. sec .ppc64LongBranchTarget .get () ||
886+ rel.inputSec == ctx. sec .igotPlt .get ()))
886887 continue ;
887888 const uint8_t *relocTarget =
888889 bufStart + relOsec->offset + rel.inputSec ->getOffset (rel.offsetInSec );
0 commit comments