-msmall-data on Alpha
Richard Henderson
rth@redhat.com
Tue Apr 29 02:24:00 GMT 2003
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~
More information about the Gcc
mailing list