On Sat, 2006-09-09 at 17:34 +0200, mathieu lacage wrote:
> Another solution would be to do something like this:
>
> extern void *magic_function (void *variable_uid);
>
> static int a;
> void foo (void)
> {
> void *ptr = magic_function (&a);
> int *pa = (int *)ptr;
> *pa = 1;
>
On Sat, 2006-09-09 at 16:52 +0100, Dave Korn wrote:
> I think this would be a great feature to have, even if it did only work with
> simple globals and couldn't handle TLS.
>
> Disclaimer: I haven't thought it through thoroughly yet :) Nor am I sure
> whether the better solution might not be
On 09 September 2006 16:34, mathieu lacage wrote:
> The idea is to change the way the address of a global
> variable is calculated: rather than merely access a memory
> area directly or through the GOT, we need to add another
> level of indirection.
>
> The simplest way to add another level of in