Lines Matching refs:shTable
122 static int readSectionHeadersAll(ifstream& elfFile, vector<Elf64_Shdr>& shTable) { in readSectionHeadersAll() argument
133 shTable.resize(eh.e_shnum); in readSectionHeadersAll()
135 if (!elfFile.read((char*)shTable.data(), (eh.e_shnum * eh.e_shentsize))) return -ENOMEM; in readSectionHeadersAll()
142 vector<Elf64_Shdr> shTable; in readSectionByIdx() local
143 int ret = readSectionHeadersAll(elfFile, shTable); in readSectionByIdx()
146 elfFile.seekg(shTable[id].sh_offset); in readSectionByIdx()
149 sec.resize(shTable[id].sh_size); in readSectionByIdx()
150 if (!elfFile.read(sec.data(), shTable[id].sh_size)) return -1; in readSectionByIdx()
184 vector<Elf64_Shdr> shTable; in readSectionByName() local
187 ret = readSectionHeadersAll(elfFile, shTable); in readSectionByName()
193 for (int i = 0; i < (int)shTable.size(); i++) { in readSectionByName()
194 char* secname = secStrTab.data() + shTable[i].sh_name; in readSectionByName()
199 dataTmp.resize(shTable[i].sh_size); in readSectionByName()
201 elfFile.seekg(shTable[i].sh_offset); in readSectionByName()
204 if (!elfFile.read((char*)dataTmp.data(), shTable[i].sh_size)) return -1; in readSectionByName()
238 vector<Elf64_Shdr> shTable; in readSectionByType() local
240 ret = readSectionHeadersAll(elfFile, shTable); in readSectionByType()
243 for (int i = 0; i < (int)shTable.size(); i++) { in readSectionByType()
244 if ((int)shTable[i].sh_type != type) continue; in readSectionByType()
247 dataTmp.resize(shTable[i].sh_size); in readSectionByType()
249 elfFile.seekg(shTable[i].sh_offset); in readSectionByType()
252 if (!elfFile.read((char*)dataTmp.data(), shTable[i].sh_size)) return -1; in readSectionByType()
349 vector<Elf64_Shdr> shTable; in getSectionSymNames() local
355 ret = readSectionHeadersAll(elfFile, shTable); in getSectionSymNames()
359 for (int i = 0; i < (int)shTable.size(); i++) { in getSectionSymNames()
360 ret = getSymName(elfFile, shTable[i].sh_name, name); in getSectionSymNames()
389 vector<Elf64_Shdr> shTable; in readCodeSections() local
392 ret = readSectionHeadersAll(elfFile, shTable); in readCodeSections()
394 entries = shTable.size(); in readCodeSections()
408 ret = getSymName(elfFile, shTable[i].sh_name, name); in readCodeSections()
438 ret = getSymName(elfFile, shTable[i + 1].sh_name, name); in readCodeSections()