diff --git a/bpf/loader/NetBpfLoad.cpp b/bpf/loader/NetBpfLoad.cpp index f02241c77e..aebaa9c9e3 100644 --- a/bpf/loader/NetBpfLoad.cpp +++ b/bpf/loader/NetBpfLoad.cpp @@ -271,29 +271,6 @@ static int readSectionByName(const char* name, ifstream& elfFile, vector& dat return -2; } -unsigned int readSectionUint(const char* name, ifstream& elfFile) { - vector theBytes; - int ret = readSectionByName(name, elfFile, theBytes); - if (ret) { - ALOGE("Couldn't find section %s.", name); - abort(); - } else if (theBytes.size() < sizeof(unsigned int)) { - ALOGE("Section %s is too short.", name); - abort(); - } else { - // decode first 4 bytes as LE32 uint, there will likely be more bytes due to alignment. - unsigned int value = static_cast(theBytes[3]); - value <<= 8; - value += static_cast(theBytes[2]); - value <<= 8; - value += static_cast(theBytes[1]); - value <<= 8; - value += static_cast(theBytes[0]); - ALOGD("Section %s value is %u [0x%x]", name, value, value); - return value; - } -} - static int readSectionByType(ifstream& elfFile, int type, vector& data) { int ret; vector shTable;