[PATCH 03/18] scripts: extract symbol offsets using target, not host, nm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The nm(1) on other platforms may be compiled without ELF support,
thus use the cross toolchain's nm instead if possible.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 scripts/check_size            | 2 +-
 scripts/extract_symbol_offset | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/check_size b/scripts/check_size
index 54f02a63c5ef..8530435d3a1b 100755
--- a/scripts/check_size
+++ b/scripts/check_size
@@ -5,7 +5,7 @@ file="$2"
 max="$3"
 
 # extract symbol offset from file, remove leading zeros
-ofs=$(nm -t d $file | grep "$symbol" | cut -d ' ' -f1 | sed "s/^[0]*//")
+ofs=$(${CROSS_COMPILE}nm -t d $file | grep "$symbol" | cut -d ' ' -f1 | sed "s/^[0]*//")
 
 if [ -z "${ofs}" ]; then
 	echo "symbol $symbol not found in $file"
diff --git a/scripts/extract_symbol_offset b/scripts/extract_symbol_offset
index 1a1260f526e0..78b866830e56 100755
--- a/scripts/extract_symbol_offset
+++ b/scripts/extract_symbol_offset
@@ -4,7 +4,7 @@ symbol="$1"
 file="$2"
 
 # extract symbol offset from file, remove leading zeros
-ofs=$(nm -t d $file | grep "$symbol" | cut -d ' ' -f1 | sed "s/^[0]*//")
+ofs=$(${CROSS_COMPILE}nm -t d $file | grep "$symbol" | cut -d ' ' -f1 | sed "s/^[0]*//")
 
 if [ -z "${ofs}" ]; then
 	echo "symbol $symbol not found in $file"
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux