Relaxation and .debug_loc section

Michael Eager eager@eagercon.com
Sat Jul 14 07:41:00 GMT 2007


I'm working a target that does relaxation of code addresses
in addition to branch relaxation which several targets do.

The .debug_loc section contains offsets from the base
address of a compilation unit for the start & end address
of the location list entry.  These are not relocatable
values, so there is no reloc section.

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.

Before I go off re-inventing the wheel, does anyone
have a pointer to a target which relocates the location
list entries?

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Binutils mailing list