summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2022-11-09 12:30:58 -0800
committer Cole Faust <colefaust@google.com> 2022-11-09 12:50:35 -0800
commit7a48527b95476a32b8c136c245f75b92300597f7 (patch)
tree47e297f70b6fe8757914d9c323b2f9d515852643
parentafeadc35616ba44e52beea72016d3029bf8619fd (diff)
Fix crash in check_elf_file.py
`lib` is already a string and doesn't need to be decoded. Bug: 258395719 Test: On internal master: build/soong/soong_ui.bash --make-mode --bazel-mode-staging TARGET_PRODUCT=aosp_coral TARGET_BUILD_VARIANT=userdebug droid dist device-tests platform_tests Change-Id: I83ff35339bea9f01c61d953e251788e0894005dc
-rwxr-xr-xtools/check_elf_file.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/check_elf_file.py b/tools/check_elf_file.py
index eaa1854af3..51ec23b8a6 100755
--- a/tools/check_elf_file.py
+++ b/tools/check_elf_file.py
@@ -407,8 +407,7 @@ class Checker(object):
# Chech whether all DT_NEEDED entries are specified.
for lib in self._file_under_test.dt_needed:
if lib not in specified_sonames:
- self._error('DT_NEEDED "{}" is not specified in shared_libs.'
- .format(lib.decode('utf-8')))
+ self._error(f'DT_NEEDED "{lib}" is not specified in shared_libs.')
missing_shared_libs = True
if missing_shared_libs:
@@ -471,16 +470,14 @@ class Checker(object):
if missing_symbols:
for sym, ver in sorted(missing_symbols):
- sym = sym.decode('utf-8')
if ver:
- sym += '@' + ver.decode('utf-8')
- self._error('Unresolved symbol: {}'.format(sym))
+ sym += '@' + ver
+ self._error(f'Unresolved symbol: {sym}')
self._note()
self._note('Some dependencies might be changed, thus the symbol(s) '
'above cannot be resolved.')
- self._note('Please re-build the prebuilt file: "{}".'
- .format(self._file_path))
+ self._note(f'Please re-build the prebuilt file: "{self._file_path}".')
self._note()
self._note('If this is a new prebuilt file and it is designed to have '