Lines Matching refs:Sec
107 void printRelocations(const Elf_Shdr *Sec);
129 void LoadVersionDefs(const Elf_Shdr *sec) const;
231 void ELFDumper<ELFT>::LoadVersionNeeds(const Elf_Shdr *sec) const {
232 unsigned vn_size = sec->sh_size; // Size of section in bytes
233 unsigned vn_count = sec->sh_info; // Number of Verneed entries
234 const char *sec_start = (const char *)Obj->base() + sec->sh_offset;
265 void ELFDumper<ELFT>::LoadVersionDefs(const Elf_Shdr *sec) const {
266 unsigned vd_size = sec->sh_size; // Size of section in bytes
267 unsigned vd_count = sec->sh_info; // Number of Verdef entries
268 const char *sec_start = (const char *)Obj->base() + sec->sh_offset;
312 const typename ELFO::Elf_Shdr *Sec,
315 if (!Sec)
317 StringRef Name = errorOrDefault(Obj->getSectionName(Sec));
318 W.printNumber("Section Name", Name, Sec->sh_name);
319 W.printHex("Address", Sec->sh_addr);
320 W.printHex("Offset", Sec->sh_offset);
321 W.printNumber("Link", Sec->sh_link);
324 const uint8_t *P = (const uint8_t *)Obj->base() + Sec->sh_offset;
344 const typename ELFO::Elf_Shdr *Sec,
347 if (!Sec)
349 StringRef Name = errorOrDefault(Obj->getSectionName(Sec));
350 W.printNumber("Section Name", Name, Sec->sh_name);
351 W.printHex("Address", Sec->sh_addr);
352 W.printHex("Offset", Sec->sh_offset);
353 W.printNumber("Link", Sec->sh_link);
363 (const uint8_t *)Obj->base() + Sec->sh_offset;
364 const uint8_t *SecEndAddress = SecStartAddress + Sec->sh_size;
367 Obj->getSection(Sec->sh_link);
486 ErrorOr<const typename ELFO::Elf_Shdr *> Sec = Obj.getSection(SectionIndex);
487 error(Sec.getError());
488 SectionName = errorOrDefault(Obj.getSectionName(*Sec));
975 for (const Elf_Shdr &Sec : Obj->sections()) {
976 switch (Sec.sh_type) {
980 dot_gnu_version_sec = &Sec;
985 dot_gnu_version_d_sec = &Sec;
990 dot_gnu_version_r_sec = &Sec;
995 DotDynSymSec = &Sec;
1000 DotSymtabSec = &Sec;
1003 ErrorOr<ArrayRef<Elf_Word>> TableOrErr = Obj->getSHNDXTable(Sec);
1087 for (const Elf_Shdr &Sec : Obj->sections()) {
1090 StringRef Name = errorOrDefault(Obj->getSectionName(&Sec));
1094 W.printNumber("Name", Name, Sec.sh_name);
1096 getElfSectionType(Obj->getHeader()->e_machine, Sec.sh_type),
1097 Sec.sh_type);
1098 W.printFlags("Flags", Sec.sh_flags, makeArrayRef(ElfSectionFlags));
1099 W.printHex("Address", Sec.sh_addr);
1100 W.printHex("Offset", Sec.sh_offset);
1101 W.printNumber("Size", Sec.sh_size);
1102 W.printNumber("Link", Sec.sh_link);
1103 W.printNumber("Info", Sec.sh_info);
1104 W.printNumber("AddressAlignment", Sec.sh_addralign);
1105 W.printNumber("EntrySize", Sec.sh_entsize);
1109 printRelocations(&Sec);
1124 if (*SymSec == &Sec)
1129 if (opts::SectionData && Sec.sh_type != ELF::SHT_NOBITS) {
1130 ArrayRef<uint8_t> Data = errorOrDefault(Obj->getSectionContents(&Sec));
1142 for (const Elf_Shdr &Sec : Obj->sections()) {
1145 if (Sec.sh_type != ELF::SHT_REL && Sec.sh_type != ELF::SHT_RELA)
1148 StringRef Name = errorOrDefault(Obj->getSectionName(&Sec));
1153 printRelocations(&Sec);
1190 void ELFDumper<ELFT>::printRelocations(const Elf_Shdr *Sec) {
1191 ErrorOr<const Elf_Shdr *> SymTabOrErr = Obj->getSection(Sec->sh_link);
1195 switch (Sec->sh_type) {
1197 for (const Elf_Rel &R : Obj->rels(Sec)) {
1206 for (const Elf_Rela &R : Obj->relas(Sec))
1219 ErrorOr<const Elf_Shdr *> Sec = Obj->getSection(Sym, SymTab, ShndxTable);
1220 error(Sec.getError());
1221 ErrorOr<StringRef> SecName = Obj->getSectionName(*Sec);
1667 for (const ELFO::Elf_Shdr &Sec : Obj->sections()) {
1668 if (Sec.sh_type != ELF::SHT_ARM_ATTRIBUTES)
1671 ErrorOr<ArrayRef<uint8_t>> Contents = Obj->getSectionContents(&Sec);
2088 ErrorOr<ArrayRef<uint8_t>> Sec = Obj->getSectionContents(Shdr);
2089 if (!Sec) {
2093 if (Sec->size() != sizeof(Elf_Mips_ABIFlags<ELFT>)) {
2098 auto *Flags = reinterpret_cast<const Elf_Mips_ABIFlags<ELFT> *>(Sec->data());
2126 ErrorOr<ArrayRef<uint8_t>> Sec = Obj->getSectionContents(Shdr);
2127 if (!Sec) {
2131 if (Sec->size() != sizeof(Elf_Mips_RegInfo<ELFT>)) {
2136 auto *Reginfo = reinterpret_cast<const Elf_Mips_RegInfo<ELFT> *>(Sec->data());
2149 for (const auto &Sec : Obj->sections()) {
2150 ErrorOr<StringRef> Name = Obj->getSectionName(&Sec);
2152 StackMapSection = &Sec;