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