From b3ad463c44825e4cabd7a45fd581765331e751d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= Date: Wed, 16 Jul 2025 08:51:33 -0700 Subject: [PATCH] vendorBpfLoader: remove unused readSectionUint() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test: TreeHugger Flag: EXEMPT cleanup Signed-off-by: Maciej Żenczykowski Change-Id: I1a9e8f5e419eb4cde2dd734720d314bcee2dbf9c --- loader/Loader.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) 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;