Lines Matching refs:symbol
60 COFF::symbol Data;
98 COFFSymbol *Symbol;
143 COFFSymbol *GetOrCreateCOFFSymbol(const MCSymbol * Symbol);
191 // Symbol class implementation
214 /// logic to decide if the symbol should be reported in the symbol table
230 // if it is the section symbol, keep it
231 if (Section->Symbol == this)
248 , Symbol(nullptr) {
315 COFFSymbol *WinCOFFObjectWriter::GetOrCreateCOFFSymbol(const MCSymbol * Symbol){
316 symbol_map::iterator i = SymbolMap.find(Symbol);
320 = createCOFFEntity<COFFSymbol>(Symbol->getName(), Symbols);
321 SymbolMap[Symbol] = RetSymbol;
329 /// A template used to lookup or create a symbol/section, and initialize it if
359 coff_section->Symbol = coff_symbol;
363 // In this case the auxiliary symbol is a Section Definition.
408 /// This function takes a symbol data object from the assembler
409 /// and creates the associated COFF symbol staging object.
413 MCSymbol const &Symbol = SymbolData.getSymbol();
414 COFFSymbol *coff_symbol = GetOrCreateCOFFSymbol(&Symbol);
415 SymbolMap[&Symbol] = coff_symbol;
420 if (Symbol.isVariable()) {
422 dyn_cast<MCSymbolRefExpr>(Symbol.getVariableValue());
430 + Symbol.getName().str()
440 // Setup the Weak External auxiliary symbol.
450 const MCSymbolData &ResSymData = Assembler.getSymbolData(Symbol);
451 const MCSymbol *Base = Layout.getBaseSymbol(Symbol);
474 report_fatal_error("conflicting sections for symbol");
535 S.Symbol->Data.SectionNumber = S.Number;
536 S.Symbol->Aux[0].Aux.SectionDefinition.Number = S.Number;
655 // "Define" each section & symbol. This creates section & symbol
703 assert(Target.getSymA() && "Relocation must reference a symbol!");
705 const MCSymbol &Symbol = Target.getSymA()->getSymbol();
706 const MCSymbol &A = Symbol.AliasedSymbol();
710 Twine("symbol '") + A.getName() + "' can not be undefined");
716 // Mark this symbol as requiring an entry in the symbol table.
720 "Symbol must already have been defined in ExecutePostLayoutBinding!");
733 Twine("symbol '") + B->getName() +
739 Twine("symbol '") + Symbol.getName() +
742 CrossSection = &Symbol.getSection() != &B->getSection();
744 // Offset of the symbol in the section
767 Reloc.Symb = coff_symbol->Section->Symbol;
831 // Assign symbol and section indexes and offsets.
843 for (auto & Symbol : Symbols) {
845 if (Symbol->Section)
846 Symbol->Data.SectionNumber = Symbol->Section->Number;
848 if (Symbol->should_keep()) {
849 MakeSymbolReal(*Symbol, Header.NumberOfSymbols++);
851 // Update auxiliary symbol info.
852 Symbol->Data.NumberOfAuxSymbols = Symbol->Aux.size();
853 Header.NumberOfSymbols += Symbol->Data.NumberOfAuxSymbols;
855 Symbol->Index = -1;
859 for (auto & Symbol : Symbols) {
860 if (Symbol->Other) {
861 assert(Symbol->Index != -1);
862 assert(Symbol->Aux.size() == 1 && "Symbol must contain one aux symbol!");
863 assert(Symbol->Aux[0].AuxType == ATWeakExternal &&
864 "Symbol's aux symbol must be a Weak External!");
865 Symbol->Aux[0].Aux.WeakExternal.TagIndex = Symbol->Other->Index;
871 if (Section->Symbol->Aux[0].Aux.SectionDefinition.Selection !=
892 Section->Symbol->Aux[0].Aux.SectionDefinition.Number = SectionIndices[Assoc];
942 assert(Sec->Symbol->Aux.size() == 1 &&
943 "Section's symbol must have one aux!");
944 AuxSymbol &Aux = Sec->Symbol->Aux[0];
946 "Section's symbol's aux symbol must be a Section Definition!");
1013 for (auto & Symbol : Symbols)
1014 if (Symbol->Index != -1)
1015 WriteSymbol(*Symbol);