diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-04 11:46:44 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-09-04 11:46:44 +0200 |
commit | 9b80b903c7fd2120a72de287fe6b0920e6d3c8ff (patch) | |
tree | 9c6196ae3bfc370f52d9ff59f569f28cf0e0a9b4 /shell/ash_test/ash-standalone/var_standalone1.right | |
parent | b7812ce0f7ee230330e18de3ac447b700311ab84 (diff) | |
download | busybox-9b80b903c7fd2120a72de287fe6b0920e6d3c8ff.tar.gz |
build system: stop .eh_frame generation
From Rich Felker:
By default, modern GCC generates DWARF2 debug/unwind tables in the
.eh_frame section of the object files/binaries. This adds significant
bloat (as much as 15%) to the size of the busybox binary, including
the portion mapped/loaded into memory at runtime (possibly a big issue
for NOMMU targets), and the section is not strippable with the strip
command due to being part of the loaded program text.
I've since done some further checking - both testing and asking the
GCC developers about it - and it seems the solution is to add to the
CFLAGS -fno-unwind-tables and -fno-asynchronous-unwind-tables. If
debugging is disabled, this will prevent GCC from outputting DWARF2
tables entirely. But since busybox builds with -g by default, the
interesting case is what happens then. I originally thought these
options would break debugging, but they don't; instead, they tell GCC
to output the DWARF2 tables in the .debug_frame section instead of
the newish .eh_frame section (used for exception handling). With these
options added, busybox_unstripped is still fully debuggable, and the
final busybox binary loses the 15% bloat factor from the DWARF2
tables.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-standalone/var_standalone1.right')
0 files changed, 0 insertions, 0 deletions