This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Relaxation and .debug_loc section
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Michael Eager <eager at eagercon dot com>, binutils at sourceware dot org
- Date: Sat, 14 Jul 2007 21:05:26 +0930
- Subject: Re: Relaxation and .debug_loc section
- References: <469803B7.8090500@eagercon.com> <jewsx3h1p4.fsf@sykes.suse.de>
On Sat, Jul 14, 2007 at 09:41:27AM +0200, Andreas Schwab wrote:
> Michael Eager <eager@eagercon.com> writes:
>
> > When the relaxation pass shrinks the code, these offsets
> > point to the wrong locations. I've looked through other
> > targets to see if there is anything which looks like it
> > fixes up the .debug_loc section after relaxation, but
> > I haven't found anything.
>
> I think if you want to do linker relaxing you have to tell the assembler
> not to resolve such relocations.
Indeed, and not simplify the relocs to ones against section syms.
See tc_fix_adjustable and TC_LINKRELAX_FIXUP.
--
Alan Modra
Australia Development Lab, IBM