Lines Matching refs:Segment
127 MachO::segment_command_64 Segment;
129 Segment = adaptFrom32bits(Obj.getSegmentLoadCommand(LCI));
131 Segment = Obj.getSegment64LoadCommand(LCI);
135 Handler(Segment);
216 // Transfer \a Segment from \a Obj to the output file. This calls into \a Writer
220 // segment of \a DwarfSegmentSize size. \a EndAddress is updated to point at the
221 // highest segment address.
222 // When the __LINKEDIT segment is transfered, its offset and size are set resp.
226 const object::MachOObjectFile::LoadCommandInfo &LCI, SegmentTy Segment,
230 if (StringRef("__DWARF") == Segment.segname)
233 Segment.fileoff = Segment.filesize = 0;
235 if (StringRef("__LINKEDIT") == Segment.segname) {
236 Segment.fileoff = LinkeditOffset;
237 Segment.filesize = LinkeditSize;
240 // Check if the end address of the last segment and our current
242 // segment.
245 if (GapForDwarf == UINT64_MAX && Segment.vmaddr > EndAddress &&
246 Segment.vmaddr - EndAddress >= DwarfSegmentSize)
251 std::max<uint64_t>(PrevEndAddress, Segment.vmaddr + Segment.vmsize);
252 unsigned nsects = Segment.nsects;
254 MachO::swapStruct(Segment);
256 StringRef(reinterpret_cast<char *>(&Segment), sizeof(Segment)));
258 auto Sect = getSection(Obj, Segment, LCI, i);
266 // Write the __DWARF segment load command to the output file.
301 iterateOnSegments(Obj, [&](const MachO::segment_command_64 &Segment) {
302 if (StringRef("__LINKEDIT") == Segment.segname)
377 // We will copy every segment that isn't __DWARF.
378 iterateOnSegments(InputBinary, [&](const MachO::segment_command_64 &Segment) {
379 if (StringRef("__DWARF") == Segment.segname)
383 LoadCommandSize += segmentLoadCommandSize(Is64Bit, Segment.nsects);
386 // We will add our own brand new __DWARF segment if we have debug
467 // There is no room for the __DWARF segment at the end of the
471 warn("not enough VM space for the __DWARF segment.",
475 // Write the load command for the __DWARF segment.
503 // Pad till the Dwarf segment start.