diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2019-05-27 11:57:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-05-28 10:36:09 +0200 |
commit | 5596a398fc85bd66c3aa5afb79b41b2fba016617 (patch) | |
tree | bfca345900a7bf3271d802d480fb9117e7daba04 /scripts | |
parent | defe614845cb85b0490ffb2ac5041a3d68615b3b (diff) | |
download | barebox-5596a398fc85bd66c3aa5afb79b41b2fba016617.tar.gz barebox-5596a398fc85bd66c3aa5afb79b41b2fba016617.tar.xz |
scripts: extract symbol offsets using target, not host, nm
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@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check_size | 2 | ||||
-rwxr-xr-x | scripts/extract_symbol_offset | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/check_size b/scripts/check_size index 54f02a63c5..8530435d3a 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 1a1260f526..78b866830e 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" |