* RE: debug flags versus binary size
@ 2005-01-07 18:10 lrtaylor
0 siblings, 0 replies; 2+ messages in thread
From: lrtaylor @ 2005-01-07 18:10 UTC (permalink / raw)
To: bahadir.balban, gcc-help
You might try disabling a static build and enabling a shared build.
Statically linked binaries are generally larger than dynamically linked
ones.
Thanks,
Lyle
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Bahadir Balban
Sent: Friday, January 07, 2005 10:07 AM
To: gcc-help@gcc.gnu.org
Subject: debug flags versus binary size
Hi,
I have a buggy executable and to figure out the bug I needed to use a
stack trace. For this purpose I compiled my application with debug
support but the exe size is 94,5MB compared to optimised one that is
7,4MB. Unfortunately I cannot run it now due to insufficient memory.
What flags/configure options should I use to get an exe capable of
giving a meaningful stack trace with a smaller binary size?
I used the following configure options for the large debug-enabled
binary:
# code generation options (optimize for size)
#ac_add_options --enable-optimize=-Os
#ac_add_options --enable-strip
#ac_add_options --disable-debug
ac_add_options --enable-debug
#ac_add_options --enable-reorder
#ac_add_options --enable-elf-dynstr-gc
#ac_add_options --disable-dtd-debug
ac_add_options --enable-dtd-debug # ENABLE DTD DEBUG
ac_add_options --disable-logging
ac_add_options --disable-tests
# enable static build (exists for both debug and non-debug)
ac_add_options --disable-shared
ac_add_options --enable-static
which resulted in the following flags during compilation:
-DDEBUG -D_DEBUG -D_DEBUG_root -D_TRACING and -g.
Many thanks,
Bahadir
^ permalink raw reply [flat|nested] 2+ messages in thread
* debug flags versus binary size
@ 2005-01-07 17:06 Bahadir Balban
0 siblings, 0 replies; 2+ messages in thread
From: Bahadir Balban @ 2005-01-07 17:06 UTC (permalink / raw)
To: gcc-help
Hi,
I have a buggy executable and to figure out the bug I needed to use a
stack trace. For this purpose I compiled my application with debug
support but the exe size is 94,5MB compared to optimised one that is
7,4MB. Unfortunately I cannot run it now due to insufficient memory.
What flags/configure options should I use to get an exe capable of
giving a meaningful stack trace with a smaller binary size?
I used the following configure options for the large debug-enabled binary:
# code generation options (optimize for size)
#ac_add_options --enable-optimize=-Os
#ac_add_options --enable-strip
#ac_add_options --disable-debug
ac_add_options --enable-debug
#ac_add_options --enable-reorder
#ac_add_options --enable-elf-dynstr-gc
#ac_add_options --disable-dtd-debug
ac_add_options --enable-dtd-debug # ENABLE DTD DEBUG
ac_add_options --disable-logging
ac_add_options --disable-tests
# enable static build (exists for both debug and non-debug)
ac_add_options --disable-shared
ac_add_options --enable-static
which resulted in the following flags during compilation:
-DDEBUG -D_DEBUG -D_DEBUG_root -D_TRACING and -g.
Many thanks,
Bahadir
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-07 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-07 18:10 debug flags versus binary size lrtaylor
-- strict thread matches above, loose matches on Subject: below --
2005-01-07 17:06 Bahadir Balban
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).