• Home
  • Raw
  • Download

Lines Matching refs:cs

267 static bool isRelSection(codeSection& cs, string& name) {  in isRelSection()  argument
271 if (st.type != cs.type) continue; in isRelSection()
282 static int readCodeSections(ifstream& elfFile, vector<codeSection>& cs) { in readCodeSections() argument
322 cs.push_back(cs_temp); in readCodeSections()
442 static void dumpAllCs(vector<codeSection>& cs) { in dumpAllCs() argument
443 for (int i = 0; i < (int)cs.size(); i++) { in dumpAllCs()
444 ALOGE("Dumping cs %d, name %s\n", int(i), cs[i].name.c_str()); in dumpAllCs()
445 dumpIns((char*)cs[i].data.data(), cs[i].data.size()); in dumpAllCs()
475 static void applyMapRelo(ifstream& elfFile, vector<int> mapFds, vector<codeSection>& cs) { in applyMapRelo() argument
481 for (int k = 0; k != (int)cs.size(); k++) { in applyMapRelo()
482 Elf64_Rel* rel = (Elf64_Rel*)(cs[k].rel_data.data()); in applyMapRelo()
483 int n_rel = cs[k].rel_data.size() / sizeof(*rel); in applyMapRelo()
495 applyRelo(cs[k].data.data(), rel[i].r_offset, mapFds[j]); in applyMapRelo()
503 static int loadCodeSections(const char* elfPath, vector<codeSection>& cs, const string& license) { in loadCodeSections() argument
510 for (int i = 0; i < (int)cs.size(); i++) { in loadCodeSections()
516 progPinLoc = string(BPF_FS_PATH) + "prog_" + fname + "_" + cs[i].name; in loadCodeSections()
519 ALOGD("New bpf prog load reusing prog %s, ret: %d\n", cs[i].name.c_str(), fd); in loadCodeSections()
524 fd = bpf_prog_load(cs[i].type, cs[i].name.c_str(), (struct bpf_insn*)cs[i].data.data(), in loadCodeSections()
525 cs[i].data.size(), license.c_str(), kvers, 0, in loadCodeSections()
527 ALOGD("New bpf core prog_load for %s (%s) returned: %d\n", elfPath, cs[i].name.c_str(), in loadCodeSections()
542 cs[i].prog_fd = fd; in loadCodeSections()
550 vector<codeSection> cs; in loadProg() local
565 ret = readCodeSections(elfFile, cs); in loadProg()
572 if (0) dumpAllCs(cs); in loadProg()
583 applyMapRelo(elfFile, mapFds, cs); in loadProg()
585 ret = loadCodeSections(elfPath, cs, string(license.data())); in loadProg()