This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Relaxation and .debug_loc section


Alan Modra wrote:
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.

I'll take a look at this.


The code which calls tc_fix_adjustable in write.c is stepping
through fixups.  It depends on whether there are fixups for
expressions within a section which can be completely resolved.

If it does affect expressions which are offsets within a section,
then this would result in dumping out huge numbers of relocation
entries.  This doesn't seem like a grand solution, more a kludge.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]