This is the mail archive of the gcc@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: -msmall-data on Alpha


On Sun, Apr 27, 2003 at 03:14:47AM +0200, Falk Hueffner wrote:
> The documentation seems to imply that -msmall-data + -msmall-text
> does this. However, even for static functions, a header to set up
> the gp from the pv is always emitted:
[...]
> Is that intentional?

Yeah, -msmall-data + -msmall-text only affect "local" symbolic
stuff.  Indirect function calls can still use a different GP,
as can non-local functions.

This usage is largely influenced by how the kernel and libc
want things to work.

> Also, for non-static function calls, it seems to be assumed that they
> destroy the gp, and it needs to be restored from the return address.
> Is that intended? It seems I can work around that by declaring the
> function static (even though it is defined elsewhere), but that
> doesn't seem very clean...

Or mark them with visibility hidden.


r~


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