Lines Matching refs:SD
43 doesSymbolRequireExternRelocation(const MCSymbolData *SD) { in doesSymbolRequireExternRelocation() argument
45 if (SD->getSymbol().isUndefined()) in doesSymbolRequireExternRelocation()
50 if (SD->getFlags() & SF_WeakDefinition) in doesSymbolRequireExternRelocation()
76 uint64_t MachObjectWriter::getSymbolAddress(const MCSymbolData* SD, in getSymbolAddress() argument
78 const MCSymbol &S = SD->getSymbol(); in getSymbolAddress()
110 return getSectionAddress(SD->getFragment()->getParent()) + in getSymbolAddress()
111 Layout.getSymbolOffset(SD); in getSymbolAddress()
114 uint64_t MachObjectWriter::getPaddingSize(const MCSectionData *SD, in getPaddingSize() argument
116 uint64_t EndAddr = getSectionAddress(SD) + Layout.getSectionAddressSize(SD); in getPaddingSize()
117 unsigned Next = SD->getLayoutOrder() + 1; in getPaddingSize()
203 const MCSectionData &SD, in WriteSection() argument
207 uint64_t SectionSize = Layout.getSectionAddressSize(&SD); in WriteSection()
210 if (SD.getSection().isVirtualSection()) { in WriteSection()
211 assert(Layout.getSectionFileSize(&SD) == 0 && "Invalid file size!"); in WriteSection()
221 const MCSectionMachO &Section = cast<MCSectionMachO>(SD.getSection()); in WriteSection()
225 Write64(getSectionAddress(&SD)); // address in WriteSection()
228 Write32(getSectionAddress(&SD)); // address in WriteSection()
234 if (SD.hasInstructions()) in WriteSection()
237 assert(isPowerOf2_32(SD.getAlignment()) && "Invalid alignment!"); in WriteSection()
238 Write32(Log2_32(SD.getAlignment())); in WriteSection()
242 Write32(IndirectSymBase.lookup(&SD)); // reserved1 in WriteSection()
539 for (MCSymbolData &SD : Asm.symbols()) { in ComputeSymbolTable()
540 const MCSymbol &Symbol = SD.getSymbol(); in ComputeSymbolTable()
553 for (MCSymbolData &SD : Asm.symbols()) { in ComputeSymbolTable()
554 const MCSymbol &Symbol = SD.getSymbol(); in ComputeSymbolTable()
560 if (!SD.isExternal() && !Symbol.isUndefined()) in ComputeSymbolTable()
564 MSD.SymbolData = &SD; in ComputeSymbolTable()
581 for (MCSymbolData &SD : Asm.symbols()) { in ComputeSymbolTable()
582 const MCSymbol &Symbol = SD.getSymbol(); in ComputeSymbolTable()
588 if (SD.isExternal() || Symbol.isUndefined()) in ComputeSymbolTable()
592 MSD.SymbolData = &SD; in ComputeSymbolTable()
618 for (const MCSectionData &SD : Asm) { in ComputeSymbolTable() local
619 std::vector<RelAndSymbol> &Relocs = Relocations[&SD]; in ComputeSymbolTable()
640 const MCSectionData *SD = Order[i]; in computeSectionAddresses() local
641 StartAddress = RoundUpToAlignment(StartAddress, SD->getAlignment()); in computeSectionAddresses()
642 SectionAddress[SD] = StartAddress; in computeSectionAddresses()
643 StartAddress += Layout.getSectionAddressSize(SD); in computeSectionAddresses()
648 StartAddress += getPaddingSize(SD, Layout); in computeSectionAddresses()
805 const MCSectionData &SD = *it; in WriteObject() local
806 uint64_t Address = getSectionAddress(&SD); in WriteObject()
807 uint64_t Size = Layout.getSectionAddressSize(&SD); in WriteObject()
808 uint64_t FileSize = Layout.getSectionFileSize(&SD); in WriteObject()
809 FileSize += getPaddingSize(&SD, Layout); in WriteObject()
813 if (SD.getSection().isVirtualSection()) in WriteObject()