diff options
| author | Tom Rini <[email protected]> | 2021-07-29 12:10:23 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-07-29 12:10:55 -0400 |
| commit | 15f7e0dc01d8a851fb1bfbf0e47eab5b67ed26b3 (patch) | |
| tree | a05518590771cfaff996f35856b9d9d8edfa7221 /scripts | |
| parent | 38436abd5e58044eccddbcd7ec3610a9104e86b6 (diff) | |
| parent | 62b27a561c2868d95445905ad554297e43cc0f2b (diff) | |
Merge branch '2021-07-28-assorted-fixes'
- Assorted bugfixes
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.spl | 2 | ||||
| -rwxr-xr-x | scripts/gen_ll_addressable_symbols.sh | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 5be1a9ba1b1..25a3e7fa52e 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -459,7 +459,7 @@ u-boot-spl-keep-syms-lto_c := \ quiet_cmd_keep_syms_lto = KSL $@ cmd_keep_syms_lto = \ - NM=$(NM) $(srctree)/scripts/gen_ll_addressable_symbols.sh $^ >$@ + $(srctree)/scripts/gen_ll_addressable_symbols.sh $(NM) $^ > $@ quiet_cmd_keep_syms_lto_cc = KSLCC $@ cmd_keep_syms_lto_cc = \ diff --git a/scripts/gen_ll_addressable_symbols.sh b/scripts/gen_ll_addressable_symbols.sh index 3978a39d970..b8840dd0113 100755 --- a/scripts/gen_ll_addressable_symbols.sh +++ b/scripts/gen_ll_addressable_symbols.sh @@ -5,8 +5,11 @@ # Generate __ADDRESSABLE(symbol) for every linker list entry symbol, so that LTO # does not optimize these symbols away +# The expected parameter of this script is the command requested to have +# the U-Boot symbols to parse, for example: $(NM) $(u-boot-main) + set -e echo '#include <common.h>' -$NM "$@" 2>/dev/null | grep -oe '_u_boot_list_2_[a-zA-Z0-9_]*_2_[a-zA-Z0-9_]*' | \ +$@ 2>/dev/null | grep -oe '_u_boot_list_2_[a-zA-Z0-9_]*_2_[a-zA-Z0-9_]*' | \ sort -u | sed -e 's/^\(.*\)/extern char \1[];\n__ADDRESSABLE(\1);/' |
