From e5dd0b1eb9a060c45a863de2e0e915bff3b6d511 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 14 Feb 2020 18:18:57 +0900 Subject: [PATCH] mksymtab.sh: Avoid using find -executable As it seems GNU-find only. macOS doesn't have it. -perm is in POSIX and should be more widely available. --- examples/elf/tests/mksymtab.sh | 2 +- examples/module/drivers/mksymtab.sh | 2 +- examples/posix_spawn/filesystem/mksymtab.sh | 2 +- examples/sotest/lib/mksymtab.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/elf/tests/mksymtab.sh b/examples/elf/tests/mksymtab.sh index 0bdff482b..4e8a1106f 100755 --- a/examples/elf/tests/mksymtab.sh +++ b/examples/elf/tests/mksymtab.sh @@ -22,7 +22,7 @@ fi # Extract all of the undefined symbols from the ELF files and create a # list of sorted, unique undefined variable names. -varlist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` +varlist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` # Now output the symbol table as a structure in a C source file. All # undefined symbols are declared as void* types. If the toolchain does diff --git a/examples/module/drivers/mksymtab.sh b/examples/module/drivers/mksymtab.sh index e6d231b34..bc4335da1 100755 --- a/examples/module/drivers/mksymtab.sh +++ b/examples/module/drivers/mksymtab.sh @@ -22,7 +22,7 @@ fi # Extract all of the undefined symbols from the MODULE files and create a # list of sorted, unique undefined variable names. -varlist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` +varlist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` # Now output the symbol table as a structure in a C source file. All # undefined symbols are declared as void* types. If the toolchain does diff --git a/examples/posix_spawn/filesystem/mksymtab.sh b/examples/posix_spawn/filesystem/mksymtab.sh index 4b4720564..8b7d4dc23 100755 --- a/examples/posix_spawn/filesystem/mksymtab.sh +++ b/examples/posix_spawn/filesystem/mksymtab.sh @@ -22,7 +22,7 @@ fi # Extract all of the undefined symbols from the ELF files and create a # list of sorted, unique undefined variable names. -varlist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` +varlist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` # Now output the symbol table as a structure in a C source file. All # undefined symbols are declared as void* types. If the toolchain does diff --git a/examples/sotest/lib/mksymtab.sh b/examples/sotest/lib/mksymtab.sh index 4b5b043e2..28db68f97 100755 --- a/examples/sotest/lib/mksymtab.sh +++ b/examples/sotest/lib/mksymtab.sh @@ -23,7 +23,7 @@ fi # Extract all of the undefined symbols from the SOTEST files and create a # list of sorted, unique undefined variable names. -tmplist=`find ${dir} -executable -type f | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` +tmplist=`find ${dir} -type f -perm -a=x | xargs nm | fgrep ' U ' | sed -e "s/^[ ]*//g" | cut -d' ' -f2 | sort | uniq` # Remove the special symbol 'modprint'. It it is not exported by the # base firmware, but rather in this test from one shared library to another.