Home | History | Annotate | Download | only in MC

Lines Matching refs:SD

42 doesSymbolRequireExternRelocation(const MCSymbolData *SD) {
44 if (SD->Symbol->isUndefined())
49 if (SD->getFlags() & SF_WeakDefinition)
75 uint64_t MachObjectWriter::getSymbolAddress(const MCSymbolData* SD,
77 const MCSymbol &S = SD->getSymbol();
109 return getSectionAddress(SD->getFragment()->getParent()) +
110 Layout.getSymbolOffset(SD);
113 uint64_t MachObjectWriter::getPaddingSize(const MCSectionData *SD,
115 uint64_t EndAddr = getSectionAddress(SD) + Layout.getSectionAddressSize(SD);
116 unsigned Next = SD->getLayoutOrder() + 1;
202 const MCSectionData &SD,
206 uint64_t SectionSize = Layout.getSectionAddressSize(&SD);
209 if (SD.getSection().isVirtualSection()) {
210 assert(Layout.getSectionFileSize(&SD) == 0 && "Invalid file size!");
220 const MCSectionMachO &Section = cast<MCSectionMachO>(SD.getSection());
224 Write64(getSectionAddress(&SD)); // address
227 Write32(getSectionAddress(&SD)); // address
233 if (SD.hasInstructions())
236 assert(isPowerOf2_32(SD.getAlignment()) && "Invalid alignment!");
237 Write32(Log2_32(SD.getAlignment()));
241 Write32(IndirectSymBase.lookup(&SD)); // reserved1
556 for (MCSymbolData &SD : Asm.symbols()) {
557 const MCSymbol &Symbol = SD.getSymbol();
560 if (!Asm.isSymbolLinkerVisible(SD.getSymbol()))
563 if (!SD.isExternal() && !Symbol.isUndefined())
574 MSD.SymbolData = &SD;
591 for (MCSymbolData &SD : Asm.symbols()) {
592 const MCSymbol &Symbol = SD.getSymbol();
595 if (!Asm.isSymbolLinkerVisible(SD.getSymbol()))
598 if (SD.isExternal() || Symbol.isUndefined())
609 MSD.SymbolData = &SD;
645 const MCSectionData *SD = Order[i];
646 StartAddress = RoundUpToAlignment(StartAddress, SD->getAlignment());
647 SectionAddress[SD] = StartAddress;
648 StartAddress += Layout.getSectionAddressSize(SD);
653 StartAddress += getPaddingSize(SD, Layout);
659 for (MCSymbolData &SD : Asm.symbols()) {
660 if (!SD.getSymbol().isVariable())
665 const MCExpr *Expr = SD.getSymbol().getVariableValue();
669 const_cast<MCSymbol*>(&SD.getSymbol())->setAbsolute();
831 const MCSectionData &SD = *it;
832 uint64_t Address = getSectionAddress(&SD);
833 uint64_t Size = Layout.getSectionAddressSize(&SD);
834 uint64_t FileSize = Layout.getSectionFileSize(&SD);
835 FileSize += getPaddingSize(&SD, Layout);
839 if (SD.getSection().isVirtualSection())