gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: gplink module ordering
From: Craig Franklin
Date: 19 Mar 2004 19:41:33 -0600

On Thu, 2004-03-18 at 18:02, George M. Gallant wrote:
> Hello,
> 
> I just ran into a problem using gplink where the linker placed a routine
> outside the pic18 branch range. 

Can you send me an example.  What version of gputils?

Using a relative branch between sections should be avoided if they
aren't absolute or assigned.  Relative branches don't factor into the
relocation algorithm.

> The problem can be fixed by changing
> to an absolute displacement operation. I would prefer to be able to
> force the module load order. Any hints or suggestions? 

The assignments are done in this order:

1.  Absolute sections.
2.  Assigned sections, largest section first.
3.  Unassigned sections, largest section first.

The sections are placed in the smallest location that they will fit in.
 
This method has the best chance of successfully relocating all sections
of a full device.  

> Should the linker flag a error? 

It is suppose to generate a warning.

> The ".lkr" file description seems overly cryptic to me.
> 

Anything I can explain for you?

> Regards,
>     George
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gnupic-unsubscribe@linuxhacker.org
> For additional commands, e-mail: gnupic-help@linuxhacker.org
> 


gnupic@linuxhacker.org