This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: linker --relax option with debug info
- From: Nick Clifton <nickc at redhat dot com>
- To: M R Swami Reddy <MR dot Swami dot Reddy at nsc dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 08 Dec 2009 11:10:17 +0000
- Subject: Re: linker --relax option with debug info
- References: <4B1DD50A.5090603@nsc.com>
Hi Swami,
I am using a target (ie cr16-elf) with relax option supported by
linker. But when I wanted to debug an application with -g option,
I could see some mis-match in debug information, due to --relax
option.
Could you please suggest, if the --relax option need to disable with -g
option?
I would advise against this. It would be better to find and fix the
problems in the relaxing code when working with debug information. If
you have a look at the MN10300 port you may find some hints as to where
the problem(s) may be found. (I spent a lot of time fixing the MN10300
port to work with -g and --relax).
The point is that you should be able to debug optimized code and
therefore the use should be able to use g and --relax together.
Cheers
Nick