This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: ARM: Imply frame pointer for arm-linux profiling


On Wed, 2005-05-11 at 15:47, Daniel Jacobowitz wrote:

> > 2) The address of the count word is always stored PIC, even in non-pic
> > code.  That means we can profile both normal and PIC code in the same
> > manner. 
> 
> This is only adequately PIC on systems where the text and data segments
> are loaded at fixed offsets from each other.  I've got at least one
> (VxWorks) where this isn't the case.  I think some other platforms have
> similar constraints.
> 
> I suppose those platforms can use a similar approach to Linux's though;
> no counters at all.
> 

If the platform environment relocates the code segment dynamically (eg,
symbianos), then there's no need to make the sequence PIC at all.  The
sequence I cited is unashamedly SVr4 centric.

> I'd probably give the with and without counters versions different
> names, for robustness.
> 

Yes, that would be sensible.  Indeed, with different names the need to
have the same sequence in each point can be reduced, so you could factor
out the thumb/arm and the PIC/absolute/no-counter cases as appropriate.

R.



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