This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Best way to add DBX_USE_BINCL to a.out toolchains?
- To: gcc at gcc dot gnu dot org
- Subject: Best way to add DBX_USE_BINCL to a.out toolchains?
- From: jtc at redback dot com (J.T. Conklin)
- Date: 06 Jun 2001 15:43:13 -0700
- Reply-To: jtc at redback dot com
While I prefer to use ELF-based toolchains for embedded targets, some-
times legacy constraints dictate otherwise. In my case, it's the fact
that we're using an old version of vxWorks/i386. I'm sure that others
have reasons why it's difficult or impossible to transition from a.out
to ELF. I mention this only to head off any suggestions that switching
to ELF will solve all the worlds problems...
After I implemented profiling for our vxWorks/i386-based systems, I
found gprof was taking nearly forever to run. Further investigation
revealed that almost all the time was spent reading the symbol table.
We don't have the same problem on vxWorks/ppc, which uses ELF objects.
Most (all?) of gcc's COFF and ELF targets define DBX_USE_BINCL (c.f.
dbxcoff.h, dbxelf.h) so the linker is able to elide duplicate debug
information. When I made the same change to the i386-aout target, our
image size shrank from 71 to 31 MB, and gprof was able to complete
it's job in reasonable time. It seems like defining DBX_USE_BINCL
would be generally useful to those stuck using a.out, at least on
the most popular targets: x86, m68k, etc.
My question is what is the best way to do this. I don't know if it's
safe to just define DBX_USE_BINCL (will the extra stabs be ignored on
old (or non-gnu) linkers that don't understand BINCL/EINCL?), or if
separate configs are necessary. If separate configs are necessary,
should I trigger off --with-gnu-ld?
I'd appreciate any guidance,
--jtc
--
J.T. Conklin
RedBack Networks