diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-06-01 01:04:32 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-06-01 01:04:32 +0200 |
commit | 5375bb5b86e266157ceceef08c367da711b8144e (patch) | |
tree | 88bc81cab11d8f0b2b6f9391f803051c081b2ecb /apps/examples/posix_spawn/filesystem/mksymtab.sh | |
parent | 27ee36b2049167a1272122548fe61aa2993d79c1 (diff) | |
download | px4-firmware-5375bb5b86e266157ceceef08c367da711b8144e.tar.gz px4-firmware-5375bb5b86e266157ceceef08c367da711b8144e.tar.bz2 px4-firmware-5375bb5b86e266157ceceef08c367da711b8144e.zip |
Cleanup, WIP, needs a NuttX checkout to Firmware/NuttX now
Diffstat (limited to 'apps/examples/posix_spawn/filesystem/mksymtab.sh')
-rwxr-xr-x | apps/examples/posix_spawn/filesystem/mksymtab.sh | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/apps/examples/posix_spawn/filesystem/mksymtab.sh b/apps/examples/posix_spawn/filesystem/mksymtab.sh deleted file mode 100755 index 51408a89c..000000000 --- a/apps/examples/posix_spawn/filesystem/mksymtab.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -usage="Usage: $0 <test-dir-path>" - -# Check for the required ROMFS directory path - -dir=$1 -if [ -z "$dir" ]; then - echo "ERROR: Missing <test-dir-path>" - echo "" - echo $usage - exit 1 -fi - -if [ ! -d "$dir" ]; then - echo "ERROR: Directory $dir does not exist" - echo "" - echo $usage - exit 1 -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` - -# 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 -# any kind of checking for function vs. data objects, then this could -# faile - -echo "#include <nuttx/compiler.h>" -echo "#include <nuttx/binfmt/symtab.h>" -echo "" - -for var in $varlist; do - echo "extern void *${var};" -done - -echo "" -echo "const struct symtab_s exports[] = " -echo "{" - -for var in $varlist; do - echo " {\"${var}\", &${var}}," -done - -echo "};" -echo "" -echo "const int nexports = sizeof(exports) / sizeof(struct symtab_s);" - |