Skip to content

Commit

Permalink
SDL: updated the script to check static symbol size in the library
Browse files Browse the repository at this point in the history
  • Loading branch information
pelya committed Jun 3, 2016
1 parent 9d68ae4 commit 088fde5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion checkStaticDataSize.sh
@@ -1,4 +1,6 @@
#!/bin/sh
# Output static/global symbols in a application lib to check if someone allocated 200 Mb static temp array.
# Used to resolve linker errors such as: Cannot load library: alloc_mem_region[815]: OOPS: 54 cannot map library 'libapplication.so'. no vspace available.
objdump -x project/obj/local/armeabi/libapplication.so | grep ' ' | sed 's/.* /0x/' | sort -n | xargs -n 2 printf '%d %s\n'
OBJ="$1"
[ -z "$OBJ" ] && OBJ=project/obj/local/armeabi-v7a/libapplication.so
objdump -x -C -w "$OBJ" | grep ' ' | sed 's/.* /0x/' | sort -n | while read SIZE NAME ; do printf '%8d ' "$SIZE" ; echo "$NAME" ; done

0 comments on commit 088fde5

Please sign in to comment.