Game Development Reference
In-Depth Information
Let's take a quick look at some of the most useful commands provided by the toolchain:
arm-none-linux-gnueabi-gcc : This is the C compiler and is equivalent to the Linux
gcc command. Most of the options are very close to those provided by its Linux
counterpart.
arm-none-linux-gnueabi-g++ : This is the C++ compiler, which wraps the gcc
command with extra options for C++.
arm-none-linux-gnueabi-ld : This is the linker used to build a final binary, either as
a monolithic file (statically) or as a shared library (dynamically).
arm-none-linux-gnueabi-objdump : This displays information about binary files.
arm-none-linux-gnueabi-strip : This removes symbols and sections from binary
files, including symbol and relocation information, debugging symbols and
sections, nonglobal symbols, and others. This can help to reduce the size of the
final executable.
For example, arm-none-linux-gnueabi-objdump is a very useful tool for peeking into your binaries. It
shows you information such as the following:
Archive header information
Contents of the overall file header
Assembler contents of executable sections
Intermix source code with disassembly
Contents of the dynamic symbol table
• Relocation entries in the file
So, to display symbol table information about the device C runtime ( libc.so ) pulled from the device
into $HOME/tmp/android/system/lib , use this command:
$ arm-none-linux-gnueabi-objdump -T ~/tmp/android/system/lib/libc.so
DYNAMIC SYMBOL TABLE:
00008560 l d .text 00000000 .text
0002c638 l d .rodata 00000000 .rodata
00032264 l d .ARM.extab 00000000 .ARM.extab
00035004 l d .data.rel.ro 00000000 .data.rel.ro
00035e58 l d .data 00000000 .data
000370e4 l d .bss 00000000 .bss
000195ec g DF .text 00000034 getwchar
0000d134 g DF .text 00000000 longjmp
...
A command like this can help you detect symbols used by your program but missing from the
device standard libraries.
 
Search WWH ::




Custom Search