This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Link time affected by debug info?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Pierre Sarrazin <sarrazip at sympatico dot ca>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 17 Nov 2005 09:42:05 +1030
- Subject: Re: Link time affected by debug info?
- References: <20051116230311.GA25039@localhost>
On Wed, Nov 16, 2005 at 06:03:11PM -0500, Pierre Sarrazin wrote:
> Hi. I work on a large C++ application that takes a lot more time
> to link when I compile the sources with debugging information (-g
> switch of g++ 3.4.2). (The linking is static and produces an 20
> meg executable file.)
>
> Why does the presence of debugging information slow the linking
> process so much? It would seem like all the linker has to do
> is to copy the debug info to the executable without caring about
> its contents. The complexity of the linking task does not seem
> to depend on that info. I'm trying to determine if the problem is
> with the linker or with gcc. Thanks.
The linker optimises the debug info. You may find that the current cvs
linker is much faster than whatever you are currently using.
--
Alan Modra
IBM OzLabs - Linux Technology Centre