The question of the size impact of building the kernel in Thumb-2 came
up to day, so I extracted some quick numbers:
$ size vmlinux-*
text data bss dec hex filename
8420507 463356 826928 9710791 942cc7 vmlinux-arm
6715539 463260 826928 8005727 7a285f vmlinux-thumb2
This is for a recent mainline kernel built with the linaro omap config.
In this case we save about 20% for code and read-only data (i.e.,
text) and 17.5% overall -- which accounts for a little under 2MB saved
in this example.
This doesn't take loadable modules into accout; we can probably expect
to see a similar size ratio there.
Cheers
---Dave
Mounting system as mmc@blk0p2 did not work. Replaced it with
/dev/block/mmcbkk0p2 as a temporary solution.
---
init.rc | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/init.rc b/init.rc
index c2836b9..e5b64ed 100644
--- a/init.rc
+++ b/init.rc
@@ -91,10 +91,9 @@ loglevel 3
on fs
# mount mmc partitions
- mount ext4 mmc@blk0p2 /system
- mount ext4 mmc@blk0p2 /system ro remount
- mount ext4 mmc@blk0p3 /cache
- mount ext4 mmc@blk0p5 /data
+ mount ext4 /dev/block/mmcblk0p2 /system ro
+ mount ext4 /dev/block/mmcblk0p3 /cache
+ mount ext4 /dev/block/mmcblk0p5 /data
on post-fs
# once everything is setup, no need to modify /
--
1.7.1
The first two patches had been post long time before, so I did not add 'v2' to them.
They includes some comments from Daniel Lezcano.
The last two patches are for working items defined for powerdebug.
Following the visibility changes in libc.so, this patch attempts to hide
private symbols in libm.so.
Reference code size measurements for HTC Passion:
$ arm-eabi-size out/target/product/passion/system/lib/libm.so
[before]
text data bss dec hex filename
88423 256 32 88711 15a87
out/target/product/passion/system/lib/libm.so
[after]
text data bss dec hex filename
87950 256 32 88238 158ae
out/target/product/passion/system/lib/libm.so
Code Review:
https://review.source.android.com/#change,17358
libc.so should not export all private symbols to reflect Android NDK.
This patch attempts to use GCC visibility pragma to hide the private
symbols in bionic. It also lets the optimizer produce better and
smaller code.
Reference code size measurements for HTC Passion:
$ arm-eabi-size out/target/product/passion/system/lib/libc.so
[before]
text data bss dec hex filename
260000 10004 45944 315948 4d22c
out/target/product/passion/system/lib/libc.so
[after]
text data bss dec hex filename
248655 9940 45944 304539 4a59b
out/target/product/passion/system/lib/libc.so
Code Review:
https://review.source.android.com/#change,17361
The following set of Android bionic patches use GCC visibility pragma
to hide the private symbols in bionic. It also lets the optimizer
produce better and smaller machine code.
[PATCH android/bionic 1/3] Hide private symbols using GCC visibility pragma
[PATCH android/bionic 2/3] Hide internal symbol __bionic_brk used by
brk() and sbrk()
[PATCH android/bionic 3/3] Hide libm private symbols using GCC visibility pragma