Lines Matching refs:SHeader
123 void initSymtabSectionHeader(Elf_Shdr &SHeader,
125 void initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name,
130 void writeSectionContent(Elf_Shdr &SHeader,
133 bool writeSectionContent(Elf_Shdr &SHeader,
136 bool writeSectionContent(Elf_Shdr &SHeader, const ELFYAML::Group &Group,
138 bool writeSectionContent(Elf_Shdr &SHeader,
190 Elf_Shdr SHeader; in initSectionHeaders() local
191 zero(SHeader); in initSectionHeaders()
192 SHeaders.push_back(SHeader); in initSectionHeaders()
199 zero(SHeader); in initSectionHeaders()
200 SHeader.sh_name = DotShStrtab.getOffset(Sec->Name); in initSectionHeaders()
201 SHeader.sh_type = Sec->Type; in initSectionHeaders()
202 SHeader.sh_flags = Sec->Flags; in initSectionHeaders()
203 SHeader.sh_addr = Sec->Address; in initSectionHeaders()
204 SHeader.sh_addralign = Sec->AddressAlign; in initSectionHeaders()
213 SHeader.sh_link = Index; in initSectionHeaders()
217 writeSectionContent(SHeader, *S, CBA); in initSectionHeaders()
221 SHeader.sh_link = getDotSymTabSecNo(); in initSectionHeaders()
231 SHeader.sh_info = Index; in initSectionHeaders()
233 if (!writeSectionContent(SHeader, *S, CBA)) in initSectionHeaders()
242 SHeader.sh_info = SymIdx; in initSectionHeaders()
243 if (!writeSectionContent(SHeader, *S, CBA)) in initSectionHeaders()
246 if (!writeSectionContent(SHeader, *S, CBA)) in initSectionHeaders()
249 SHeader.sh_entsize = 0; in initSectionHeaders()
250 SHeader.sh_size = S->Size; in initSectionHeaders()
253 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in initSectionHeaders()
257 SHeaders.push_back(SHeader); in initSectionHeaders()
263 void ELFState<ELFT>::initSymtabSectionHeader(Elf_Shdr &SHeader, in initSymtabSectionHeader() argument
265 zero(SHeader); in initSymtabSectionHeader()
266 SHeader.sh_name = DotShStrtab.getOffset(".symtab"); in initSymtabSectionHeader()
267 SHeader.sh_type = ELF::SHT_SYMTAB; in initSymtabSectionHeader()
268 SHeader.sh_link = getDotStrTabSecNo(); in initSymtabSectionHeader()
270 SHeader.sh_info = Doc.Symbols.Local.size() + 1; in initSymtabSectionHeader()
271 SHeader.sh_entsize = sizeof(Elf_Sym); in initSymtabSectionHeader()
272 SHeader.sh_addralign = 8; in initSymtabSectionHeader()
296 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign), in initSymtabSectionHeader()
298 SHeader.sh_size = arrayDataSize(makeArrayRef(Syms)); in initSymtabSectionHeader()
302 void ELFState<ELFT>::initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name, in initStrtabSectionHeader() argument
305 zero(SHeader); in initStrtabSectionHeader()
306 SHeader.sh_name = DotShStrtab.getOffset(Name); in initStrtabSectionHeader()
307 SHeader.sh_type = ELF::SHT_STRTAB; in initStrtabSectionHeader()
308 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign) in initStrtabSectionHeader()
310 SHeader.sh_size = STB.data().size(); in initStrtabSectionHeader()
311 SHeader.sh_addralign = 1; in initStrtabSectionHeader()
342 ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
348 CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent()
352 SHeader.sh_entsize = 0; in writeSectionContent()
353 SHeader.sh_size = Section.Size; in writeSectionContent()
364 ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
372 SHeader.sh_entsize = IsRela ? sizeof(Elf_Rela) : sizeof(Elf_Rel); in writeSectionContent()
373 SHeader.sh_size = SHeader.sh_entsize * Section.Relocations.size(); in writeSectionContent()
375 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent()
403 bool ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
410 SHeader.sh_entsize = sizeof(Elf_Word); in writeSectionContent()
411 SHeader.sh_size = SHeader.sh_entsize * Section.Members.size(); in writeSectionContent()
413 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent()
433 bool ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
441 SHeader.sh_entsize = sizeof(Flags); in writeSectionContent()
442 SHeader.sh_size = SHeader.sh_entsize; in writeSectionContent()
444 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); in writeSectionContent()