This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Why does ld -r disable ELF .stab/.stabstr optimization ?
- From: Earl Chew <earl_chew at agilent dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 24 Sep 2002 22:55:21 -0700
- Subject: Why does ld -r disable ELF .stab/.stabstr optimization ?
- Organization: Agilent Technologies
I'm using ld to create relocatable .o files using ELF (both MIPS
and PowerPC) to be loaded dynamically on a VxWorks system.
Our applications are fairly large (several MB), and
with debug symbols (stab) in place I see that the files are 400 MB
in size! Too large for gdb to handle gracefully.
Looking at the relocatable .o file, I see the bulk of the space
taken up by .stabstr. Digging deeper, I think the problem is that
.stabstr contains the same information duplicated many times.
I look in elflink.h elf_link_add_object_symbols, and see:
/* If this is a non-traditional, non-relocateable link, try to
optimize the handling of the .stab/.stabstr sections. */
if (! dynamic
&& ! info->relocateable
&& ! info->traditional_format
&& info->hash->creator->flavour == bfd_target_elf_flavour
&& (info->strip != strip_all && info->strip != strip_debugger))
As far as I can tell, in my case every predicate is satisfied _EXCEPT_
info->relocateable.
Why does the .stab/.stabstr optimization need to be disabled in
the case of a relocateable link?
Earl