This is the mail archive of the
mailing list for the GCC project.
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.