Home
last modified time | relevance | path

Searched refs:elfFile (Results 1 – 3 of 3) sorted by relevance

/packages/modules/Connectivity/netbpfload/
Dloader.cpp209 static int readElfHeader(ifstream& elfFile, Elf64_Ehdr* eh) { in readElfHeader() argument
210 elfFile.seekg(0); in readElfHeader()
211 if (elfFile.fail()) return -1; in readElfHeader()
213 if (!elfFile.read((char*)eh, sizeof(*eh))) return -1; in readElfHeader()
219 static int readSectionHeadersAll(ifstream& elfFile, vector<Elf64_Shdr>& shTable) { in readSectionHeadersAll() argument
223 ret = readElfHeader(elfFile, &eh); in readSectionHeadersAll()
226 elfFile.seekg(eh.e_shoff); in readSectionHeadersAll()
227 if (elfFile.fail()) return -1; in readSectionHeadersAll()
232 if (!elfFile.read((char*)shTable.data(), (eh.e_shnum * eh.e_shentsize))) return -ENOMEM; in readSectionHeadersAll()
238 static int readSectionByIdx(ifstream& elfFile, int id, vector<char>& sec) { in readSectionByIdx() argument
[all …]
Dloader.h77 unsigned int readSectionUint(const char* name, std::ifstream& elfFile, unsigned int defVal);
/packages/modules/Connectivity/tests/cts/net/native/src/
DBpfCompatTest.cpp31 std::ifstream elfFile(elfPath, std::ios::in | std::ios::binary); in doBpfStructSizeTest() local
32 ASSERT_TRUE(elfFile.is_open()); in doBpfStructSizeTest()
34 EXPECT_EQ(mapSz, readSectionUint("size_of_bpf_map_def", elfFile, 0)); in doBpfStructSizeTest()
35 EXPECT_EQ(progSz, readSectionUint("size_of_bpf_prog_def", elfFile, 0)); in doBpfStructSizeTest()