How to add 'relaxing' to loader for m68k

Alan Modra amodra@bigpond.net.au
Mon Apr 8 19:25:00 GMT 2002


On Mon, Apr 08, 2002 at 08:24:16PM -0400, Peter Barada wrote:
> 
> >You'll need to modify the asembler to emit relocs for code that is
> >normally fully resolved by the assembler, eg. branches to local
> >labels, because their offsets may change if intervening code is
> >relaxed.
> 
> Ok, noted.  Anything else?

I suggest marking object files in some way to indicate they are
candidates for linker relaxation (ie. have all the necessary relocs).
You could do this using e_flags, sh_flags, or by the presence of a
special reloc, named section, or note.  Too many options. :)

Don't be tempted to scan .text to look for places to relax.  There's
too much chance of confusion with tables etc. looking like instructions.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list