This is the mail archive of the
mailing list for the binutils project.
Re: How to add 'relaxing' to loader for m68k
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
> 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.
IBM OzLabs - Linux Technology Centre