Relaxation and .debug_loc section

Alan Modra
Sat Jul 14 16:01:00 GMT 2007

On Sat, Jul 14, 2007 at 09:41:27AM +0200, Andreas Schwab wrote:
> Michael Eager <> 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

More information about the Binutils mailing list