reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
  276     if (!_file.functionStarts.empty() || alwaysIncludeFunctionStarts) {
  280     if (_file.generateDataInCodeLoadCommand) {
  391   size += _file.segments.size() * segCommandSize;
  392   count += _file.segments.size();
  394   size += _file.sections.size() * sectionSize;
  397   if (_file.fileType == llvm::MachO::MH_DYLIB) {
  398     size += sizeof(dylib_command) + pointerAlign(_file.installName.size() + 1);
  411   if (_file.fileType != llvm::MachO::MH_PRELOAD) {
  417   if (_file.fileType == llvm::MachO::MH_EXECUTE) {
  424   if (_file.hasMinVersionLoadCommand) {
  434   if (_file.fileType == llvm::MachO::MH_EXECUTE) {
  440   for (const DependentDylib &dep : _file.dependentDylibs) {
  446   for (const StringRef &path : _file.rpaths) {
  452   if (!_file.functionStarts.empty() || alwaysIncludeFunctionStarts) {
  459   if (_file.generateDataInCodeLoadCommand) {
  485   for (const Segment &sg1 : _file.segments) {
  486     for (const Segment &sg2 : _file.segments) {
  497   for (const Section &s1 : _file.sections) {
  498     for (const Section &s2 : _file.sections) {
  511   for (const Segment &sg : _file.segments) {
  517   for (const Section &s : _file.sections) {
  520     for (const Segment &sg : _file.segments) {
  540   for (const Segment &sg : _file.segments) {
  551       segFileSize = _file.pageSize;
  566       _segInfo[&sg].fileSize = llvm::alignTo(segFileSize, _file.pageSize);
  567       fileOffset = llvm::alignTo(fileOffset + segFileSize, _file.pageSize);
  579   auto cpusubtype = MachOLinkingContext::cpuSubtypeFromArch(_file.arch);
  583   if (_file.fileType == llvm::MachO::MH_EXECUTE &&
  585       _file.os == MachOLinkingContext::OS::macOSX) {
  588     if (!failed && _file.minOSverson >= version)
  594   mh->cputype =  MachOLinkingContext::cpuTypeFromArch(_file.arch);
  596   mh->filetype = _file.fileType;
  599   mh->flags = _file.flags;
  626                           + _file.sections.size() * sizeof(typename T::section);
  634   seg->nsects = _file.sections.size();
  636     seg->vmsize = _file.sections.back().address
  637                 + _file.sections.back().content.size();
  638     seg->filesize = _sectInfo[&_file.sections.back()].fileOffset +
  639                     _file.sections.back().content.size() -
  640                     _sectInfo[&_file.sections.front()].fileOffset;
  648   for (const Section &sin : _file.sections) {
  672   for (const Segment &seg : _file.segments) {
  684       cmd->vmsize   = llvm::alignTo(linkeditSize, _file.pageSize);
  773   if (_file.fileType == llvm::MachO::MH_OBJECT) {
  787     st->nsyms   = _file.stabsSymbols.size() + _file.localSymbols.size() +
  787     st->nsyms   = _file.stabsSymbols.size() + _file.localSymbols.size() +
  788                   _file.globalSymbols.size() + _file.undefinedSymbols.size();
  788                   _file.globalSymbols.size() + _file.undefinedSymbols.size();
  797     writeVersionMinLoadCommand(_file, _swap, lc);
  812     if (_file.generateDataInCodeLoadCommand) {
  833     if (_file.fileType == llvm::MachO::MH_DYLIB) {
  835       StringRef path = _file.installName;
  842       dc->dylib.current_version       = _file.currentVersion;
  843       dc->dylib.compatibility_version = _file.compatVersion;
  874     st->nsyms   = _file.stabsSymbols.size() + _file.localSymbols.size() +
  874     st->nsyms   = _file.stabsSymbols.size() + _file.localSymbols.size() +
  875                   _file.globalSymbols.size() + _file.undefinedSymbols.size();
  875                   _file.globalSymbols.size() + _file.undefinedSymbols.size();
  883     if (_file.fileType != llvm::MachO::MH_PRELOAD) {
  888       dst->nlocalsym      = _file.stabsSymbols.size() +
  889                             _file.localSymbols.size();
  891       dst->nextdefsym     = _file.globalSymbols.size();
  893       dst->nundefsym      = _file.undefinedSymbols.size();
  912     if (_file.fileType == llvm::MachO::MH_EXECUTE) {
  928     writeVersionMinLoadCommand(_file, _swap, lc);
  937       sv.version   = _file.sourceVersion;
  945     if (_file.fileType == llvm::MachO::MH_EXECUTE) {
  952       ep.entryoff  = _file.entryAddress - _seg1addr;
  953       ep.stacksize = _file.stackSize;
  961     for (const DependentDylib &dep : _file.dependentDylibs) {
  979     for (const StringRef &path : _file.rpaths) {
 1005     if (_file.generateDataInCodeLoadCommand) {
 1021   for (const Section &s : _file.sections) {
 1037   for (Section sect : _file.sections) {
 1080   memcpy(&_buffer[_startOfFunctionStarts], _file.functionStarts.data(),
 1086   for (const DataInCode &entry : _file.dataInCode) {
 1105   appendSymbols(_file.stabsSymbols, symOffset, strOffset);
 1106   appendSymbols(_file.localSymbols, symOffset, strOffset);
 1107   appendSymbols(_file.globalSymbols, symOffset, strOffset);
 1108   appendSymbols(_file.undefinedSymbols, symOffset, strOffset);
 1112   if (_file.fileType == llvm::MachO::MH_OBJECT) {
 1114     for (const Section &section : _file.sections) {
 1124     for (const Segment &seg : _file.segments) {
 1172   for (const RebaseLocation& entry : _file.rebasingInfo) {
 1191   for (const BindLocation& entry : _file.bindingInfo) {
 1236   for (const BindLocation& entry : _file.lazyBindingInfo) {
 1427   if (_file.exportInfo.empty())
 1436   allNodes.reserve(_file.exportInfo.size()*2);
 1438   for (const Export& entry : _file.exportInfo) {
 1445   for (const Export& entry : _file.exportInfo)
 1470   _symbolTableSize = nlistSize * (_file.stabsSymbols.size()
 1471                                 + _file.localSymbols.size()
 1472                                 + _file.globalSymbols.size()
 1473                                 + _file.undefinedSymbols.size());
 1476   for (const Symbol &sym : _file.stabsSymbols) {
 1479   for (const Symbol &sym : _file.localSymbols) {
 1482   for (const Symbol &sym : _file.globalSymbols) {
 1485   for (const Symbol &sym : _file.undefinedSymbols) {
 1489   _symbolTableGlobalsStartIndex = _file.stabsSymbols.size() +
 1490                                   _file.localSymbols.size();
 1492                                     + _file.globalSymbols.size();
 1495   for (const Section &sect : _file.sections) {
 1501   _functionStartsSize = _file.functionStarts.size();
 1505   _dataInCodeSize = _file.dataInCode.size() * sizeof(data_in_code_entry);
 1509   if (_file.fileType == llvm::MachO::MH_OBJECT) {
 1532   if (_file.fileType != llvm::MachO::MH_OBJECT)