From 557308c732af76b3e4245d4fdb27df7f47316b34 Mon Sep 17 00:00:00 2001 From: Pete Bentley Date: Tue, 2 Mar 2021 16:56:39 +0000 Subject: [PATCH] Ignore LD_LIBRARY_PATH when determining file type in ldd. Otherwise if a 32bit copy of a library used by Toybox exists on LD_LIBRARY_PATH then file(1) will fail. Bug: 181666541 Test: Manually copied to device and verified correct behaviour Change-Id: I7d729927b1b433ec953c266920489613fc096e03 --- linker/ldd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linker/ldd.sh b/linker/ldd.sh index 6bc49b4b1..56810bb1d 100755 --- a/linker/ldd.sh +++ b/linker/ldd.sh @@ -10,7 +10,7 @@ function error() { [ $# -eq 1 ] || error "usage: ldd FILE" -what=$(file -L "$1") +what=$(LD_LIBRARY_PATH= file -L "$1") case "$what" in *32-bit*) linker --list "$1"