This is the mail archive of the binutils@sources.redhat.com 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]

How to add 'relaxing' to loader for m68k



I'm looking at trying to shrink out some code space in the
m68k/coldfire ports, and I'm noticing linked code that looks like:

     4fc:	4879 0000 5921 	pea 5921 <_foo+0x11>
     502:	61ff 0000 11ca 	bsrl 16ce <puts>
     508:	61ff 0000 2144 	bsrl 264e <breakpoint>

This could be changed to use word offsets for the bsr's:

     4fc:	4879 0000 5921 	pea 5921 <_foo+0x11>
     502:	6100 11ca 	bsrl 16ce <puts>
     506:	6100 2144 	bsrl 264e <breakpoint>

And then the pea could be changed to use absolute short addressing:

     4fc:	4878 5921 	pea 5921 <_foo+0x11>
     500:	6100 11ca 	bsrl 16ce <puts>
     504:	6100 2144 	bsrl 264e <breakpoint>

What's the best way to go about this?  Does the assembler create
enough reloacation records to allow for proper relaxation (bsrl->bsrw
relaxation between a conditional branch and its target, etc)?

Thanx in advance...

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)


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