22
22
#include " llvm/Support/Parallel.h"
23
23
#include " llvm/Support/Path.h"
24
24
#include " llvm/Support/TimeProfiler.h"
25
- #undef in
26
25
#if LLVM_ENABLE_ZLIB
27
26
// Avoid introducing max as a macro from Windows headers.
28
27
#define NOMINMAX
@@ -585,15 +584,15 @@ void OutputSection::writeTo(uint8_t *buf, parallel::TaskGroup &tg) {
585
584
static void finalizeShtGroup (OutputSection *os, InputSection *section) {
586
585
// sh_link field for SHT_GROUP sections should contain the section index of
587
586
// the symbol table.
588
- os->link = ctx. sec .symTab ->getParent ()->sectionIndex ;
587
+ os->link = in .symTab ->getParent ()->sectionIndex ;
589
588
590
589
if (!section)
591
590
return ;
592
591
593
592
// sh_info then contain index of an entry in symbol table section which
594
593
// provides signature of the section group.
595
594
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 ]);
597
596
598
597
// Some group members may be combined or discarded, so we need to compute the
599
598
// 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,
611
610
uint offset, const Symbol &sym, uint32_t type, uint addend) {
612
611
const auto deltaOffset = static_cast <uint64_t >(offset - out.r_offset );
613
612
out.r_offset = offset;
614
- int64_t symidx = ctx. sec .symTab ->getSymbolIndex (sym);
613
+ int64_t symidx = in .symTab ->getSymbolIndex (sym);
615
614
if (sym.type == STT_SECTION) {
616
615
auto *d = dyn_cast<Defined>(&sym);
617
616
if (d) {
@@ -732,7 +731,7 @@ void OutputSection::finalize() {
732
731
if (!first || isa<SyntheticSection>(first))
733
732
return ;
734
733
735
- link = ctx. sec .symTab ->getParent ()->sectionIndex ;
734
+ link = in .symTab ->getParent ()->sectionIndex ;
736
735
// sh_info for SHT_REL[A] sections should contain the section header index of
737
736
// the section to which the relocation applies.
738
737
InputSectionBase *s = first->getRelocatedSection ();
@@ -882,8 +881,8 @@ void OutputSection::checkDynRelAddends(const uint8_t *bufStart) {
882
881
// Some targets have NOBITS synthetic sections with dynamic relocations
883
882
// with non-zero addends. Skip such sections.
884
883
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 ()))
887
886
continue ;
888
887
const uint8_t *relocTarget =
889
888
bufStart + relOsec->offset + rel.inputSec ->getOffset (rel.offsetInSec );
0 commit comments