This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gc-sections & debug info


Hi Alan,

We have two targets -

ip2k: gcc v2.97 (redhat release) using stabs.
ip3k: gcc v3.4 (top of trunk from June) using stabs or dwarf.

I have only verified the ip2k handling so far - will check the ip3k
tomorrow.

As far as I can tell the linker has very little understanding of the debug
information - it looks like if a port wants to remove code through
gc-sections or relaxation then it is up to the port code to fix it?

Presumably every port has the same problem with gc-sections, some ports
support a form of relaxation, and many ports support more than one type of
debug output. Are there a set of functions for adjusting/manipulating debug
info in the linker?

In the ip2k relax code we directly hack the stabs info - the other ports I
looked at don't seam to do anything to fix the debug info so I assume that
they will have problems with the line numbers not lining up if they try to
debug.

BTW - It is not possible to build our OS/application software without
gc-sections even just to debug - when you only have 64k of program ram every
function counts :-)

I would appreciate any advice.

Thanks

Nick

----- Original Message ----- 
From: "Alan Modra" <amodra@bigpond.net.au>
To: "Jafa" <jafa@silicondust.com>
Cc: <binutils@sources.redhat.com>
Sent: Wednesday, August 27, 2003 5:06 PM
Subject: Re: gc-sections & debug info


> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> On Wed, Aug 27, 2003 at 02:52:26PM -0700, Jafa wrote:
> > I have traced it down - we use --gc-sections and the linker is correctly
> > removing all the functions that are not referenced, however leaves all
the
> > debug info for those sections.
>
> You left out a lot of information.  What target?  What type of debug
> info (eg. stabs vs dwarf)?  What version of gcc?
>
> -- 
> Alan Modra
> IBM OzLabs - Linux Technology Centre
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]