This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Small footprint on Embedded system
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gcj mail list <java at gcc dot gnu dot org>
- Date: Tue, 24 Sep 2002 20:21:07 -0400 (EDT)
- Subject: Re: Small footprint on Embedded system
On 24 Sep 2002, Tom Tromey wrote:
> I thought the debug info didn't get mapped by ld.so. Is that
> incorrect?
You're correct. I changed topic slightly, though the OP talked about
size of .so files, which reminded me of it.
> Anyway, people are best advised to build without debug info for
> production use. I assume that most OS packagers do this already (I
> haven't looked).
Well yes but... it's an annoyance that the .so and .a are so large when
bootstrapping gcc. The extra debug info may also impact bootstrap times,
though I haven't measured.
Incidentally, I always preserve debug sections even in production, not
knowing when I might need to attach gdb to diagnose a problem in the
field.
> It would be nice if gdb could find the debug info in the .o files.
> Then we could simply omit it from the .so. I imagine this is tricky,
> or it probably would have been implemented already.
The idea behind my little patch is that info for e.g. java.lang.Object is
emitted exactly once in libgcj.so rather than once per class. That
shrinks libgcj.so enormously. I'd think gdb could be taught to understand
that, though I never attempted it.
The g++ frontend makes considerable use of TYPE_DECL_SUPPRESS_DEBUG while
gcj currently emits everything for -g<n> where n > 1.
Jeff