Lines Matching refs:SHeader

121   void initSymtabSectionHeader(Elf_Shdr &SHeader,
123 void initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name,
128 void writeSectionContent(Elf_Shdr &SHeader,
131 bool writeSectionContent(Elf_Shdr &SHeader,
134 bool writeSectionContent(Elf_Shdr &SHeader, const ELFYAML::Group &Group,
185 Elf_Shdr SHeader; in initSectionHeaders() local
186 zero(SHeader); in initSectionHeaders()
187 SHeaders.push_back(SHeader); in initSectionHeaders()
194 zero(SHeader); in initSectionHeaders()
195 SHeader.sh_name = DotShStrtab.getOffset(Sec->Name); in initSectionHeaders()
196 SHeader.sh_type = Sec->Type; in initSectionHeaders()
197 SHeader.sh_flags = Sec->Flags; in initSectionHeaders()
198 SHeader.sh_addr = Sec->Address; in initSectionHeaders()
199 SHeader.sh_addralign = Sec->AddressAlign; in initSectionHeaders()
208 SHeader.sh_link = Index; in initSectionHeaders()
212 writeSectionContent(SHeader, *S, CBA); in initSectionHeaders()
216 SHeader.sh_link = getDotSymTabSecNo(); in initSectionHeaders()
224 SHeader.sh_info = Index; in initSectionHeaders()
226 if (!writeSectionContent(SHeader, *S, CBA)) in initSectionHeaders()
235 SHeader.sh_info = SymIdx; in initSectionHeaders()
236 if (!writeSectionContent(SHeader, *S, CBA)) in initSectionHeaders()
241 SHeaders.push_back(SHeader); in initSectionHeaders()
247 void ELFState<ELFT>::initSymtabSectionHeader(Elf_Shdr &SHeader, in initSymtabSectionHeader() argument
249 zero(SHeader); in initSymtabSectionHeader()
250 SHeader.sh_name = DotShStrtab.getOffset(".symtab"); in initSymtabSectionHeader()
251 SHeader.sh_type = ELF::SHT_SYMTAB; in initSymtabSectionHeader()
252 SHeader.sh_link = getDotStrTabSecNo(); in initSymtabSectionHeader()
254 SHeader.sh_info = Doc.Symbols.Local.size() + 1; in initSymtabSectionHeader()
255 SHeader.sh_entsize = sizeof(Elf_Sym); in initSymtabSectionHeader()
278 writeArrayData(CBA.getOSAndAlignedOffset(SHeader.sh_offset), in initSymtabSectionHeader()
280 SHeader.sh_size = arrayDataSize(makeArrayRef(Syms)); in initSymtabSectionHeader()
284 void ELFState<ELFT>::initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name, in initStrtabSectionHeader() argument
287 zero(SHeader); in initStrtabSectionHeader()
288 SHeader.sh_name = DotShStrtab.getOffset(Name); in initStrtabSectionHeader()
289 SHeader.sh_type = ELF::SHT_STRTAB; in initStrtabSectionHeader()
290 CBA.getOSAndAlignedOffset(SHeader.sh_offset) << STB.data(); in initStrtabSectionHeader()
291 SHeader.sh_size = STB.data().size(); in initStrtabSectionHeader()
292 SHeader.sh_addralign = 1; in initStrtabSectionHeader()
323 ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
328 raw_ostream &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset); in writeSectionContent()
332 SHeader.sh_entsize = 0; in writeSectionContent()
333 SHeader.sh_size = Section.Size; in writeSectionContent()
344 ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
354 SHeader.sh_entsize = IsRela ? sizeof(Elf_Rela) : sizeof(Elf_Rel); in writeSectionContent()
355 SHeader.sh_size = SHeader.sh_entsize * Section.Relocations.size(); in writeSectionContent()
357 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset); in writeSectionContent()
386 bool ELFState<ELFT>::writeSectionContent(Elf_Shdr &SHeader, in writeSectionContent() argument
395 SHeader.sh_entsize = sizeof(Elf_Word); in writeSectionContent()
396 SHeader.sh_size = SHeader.sh_entsize * Section.Members.size(); in writeSectionContent()
398 auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset); in writeSectionContent()