This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -msmall-data on Alpha
- From: Richard Henderson <rth at redhat dot com>
- To: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 28 Apr 2003 15:39:43 -0700
- Subject: Re: -msmall-data on Alpha
- References: <87n0ic91x4.fsf@student.uni-tuebingen.de>
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~