Lines Matching full:segment

162     MachO::segment_command_64 Segment;
164 Segment = adaptFrom32bits(Obj.getSegmentLoadCommand(LCI));
166 Segment = Obj.getSegment64LoadCommand(LCI);
170 Handler(Segment);
259 // Transfer \a Segment from \a Obj to the output file. This calls into \a Writer
264 // segment of \a DwarfSegmentSize size. \a EndAddress is updated to point at the
265 // highest segment address.
267 // When the __LINKEDIT segment is transferred, its offset and size are set resp.
274 const object::MachOObjectFile::LoadCommandInfo &LCI, SegmentTy Segment,
279 if (StringRef("__DWARF") == Segment.segname)
282 if (StringRef("__TEXT") == Segment.segname && EHFrameSize > 0) {
283 Segment.fileoff = EHFrameOffset;
284 Segment.filesize = EHFrameSize;
285 } else if (StringRef("__LINKEDIT") == Segment.segname) {
286 Segment.fileoff = LinkeditOffset;
287 Segment.filesize = LinkeditSize;
289 Segment.vmsize = alignTo(LinkeditSize, 0x1000);
291 Segment.fileoff = Segment.filesize = 0;
294 // Check if the end address of the last segment and our current
296 // segment.
299 if (GapForDwarf == UINT64_MAX && Segment.vmaddr > EndAddress &&
300 Segment.vmaddr - EndAddress >= DwarfSegmentSize)
305 std::max<uint64_t>(PrevEndAddress, Segment.vmaddr + Segment.vmsize);
306 unsigned nsects = Segment.nsects;
308 MachO::swapStruct(Segment);
309 Writer.W.OS.write(reinterpret_cast<char *>(&Segment), sizeof(Segment));
311 auto Sect = getSection(Obj, Segment, LCI, i);
324 // Write the __DWARF segment load command to the output file.
477 // We will copy every segment that isn't __DWARF.
478 iterateOnSegments(InputBinary, [&](const MachO::segment_command_64 &Segment) {
479 if (StringRef("__DWARF") == Segment.segname)
483 LoadCommandSize += segmentLoadCommandSize(Is64Bit, Segment.nsects);
486 // We will add our own brand new __DWARF segment if we have debug
579 // There is no room for the __DWARF segment at the end of the
583 warn("not enough VM space for the __DWARF segment.",
587 // Write the load command for the __DWARF segment.
625 // Pad till the Dwarf segment start.
636 // Apply relocations to the contents of the DWARF segment.