Lines Matching refs:Sec

168       for (const std::unique_ptr<Section> &Sec : LC.Sections)  in writeLoadCommands()  local
169 writeSectionInLoadCommand<MachO::section>(*Sec, Begin); in writeLoadCommands()
178 for (const std::unique_ptr<Section> &Sec : LC.Sections) in writeLoadCommands() local
179 writeSectionInLoadCommand<MachO::section_64>(*Sec, Begin); in writeLoadCommands()
215 void MachOWriter::writeSectionInLoadCommand(const Section &Sec, uint8_t *&Out) { in writeSectionInLoadCommand() argument
217 assert(Sec.Segname.size() <= sizeof(Temp.segname) && "too long segment name"); in writeSectionInLoadCommand()
218 assert(Sec.Sectname.size() <= sizeof(Temp.sectname) && in writeSectionInLoadCommand()
221 memcpy(Temp.segname, Sec.Segname.data(), Sec.Segname.size()); in writeSectionInLoadCommand()
222 memcpy(Temp.sectname, Sec.Sectname.data(), Sec.Sectname.size()); in writeSectionInLoadCommand()
223 Temp.addr = Sec.Addr; in writeSectionInLoadCommand()
224 Temp.size = Sec.Size; in writeSectionInLoadCommand()
225 Temp.offset = Sec.Offset; in writeSectionInLoadCommand()
226 Temp.align = Sec.Align; in writeSectionInLoadCommand()
227 Temp.reloff = Sec.RelOff; in writeSectionInLoadCommand()
228 Temp.nreloc = Sec.NReloc; in writeSectionInLoadCommand()
229 Temp.flags = Sec.Flags; in writeSectionInLoadCommand()
230 Temp.reserved1 = Sec.Reserved1; in writeSectionInLoadCommand()
231 Temp.reserved2 = Sec.Reserved2; in writeSectionInLoadCommand()
241 for (const std::unique_ptr<Section> &Sec : LC.Sections) { in writeSections() local
242 if (!Sec->hasValidOffset()) { in writeSections()
243 assert((Sec->Offset == 0) && "Skipped section's offset must be zero"); in writeSections()
244 assert((Sec->isVirtualSection() || Sec->Size == 0) && in writeSections()
249 assert(Sec->Offset && "Section offset can not be zero"); in writeSections()
250 assert((Sec->Size == Sec->Content.size()) && "Incorrect section size"); in writeSections()
251 memcpy(Buf->getBufferStart() + Sec->Offset, Sec->Content.data(), in writeSections()
252 Sec->Content.size()); in writeSections()
253 for (size_t Index = 0; Index < Sec->Relocations.size(); ++Index) { in writeSections()
254 RelocationInfo RelocInfo = Sec->Relocations[Index]; in writeSections()
258 : (*RelocInfo.Sec)->Index; in writeSections()
264 memcpy(Buf->getBufferStart() + Sec->RelOff + in writeSections()