diff --git a/loader/Loader.cpp b/loader/Loader.cpp index 97fac23..268ec52 100644 --- a/loader/Loader.cpp +++ b/loader/Loader.cpp @@ -214,29 +214,6 @@ static int readSectionByName(const char* name, ifstream& elfFile, vector& return -2; } -unsigned int readSectionUint(const char* name, ifstream& elfFile, unsigned int defVal) { - vector theBytes; - int ret = readSectionByName(name, elfFile, theBytes); - if (ret) { - ALOGV("Couldn't find section %s (defaulting to %u [0x%x]).", name, defVal, defVal); - return defVal; - } else if (theBytes.size() < sizeof(unsigned int)) { - ALOGE("Section %s too short (defaulting to %u [0x%x]).", name, defVal, defVal); - return defVal; - } 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]); - ALOGV("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;