[gccsdk] [GCCSDK commit] lee - r2546 - in trunk/gcc/unixlib: Docs source/clib/unixlib source/sys source/unix

Nick Burrett nick at sqrt.co.uk
Tue Mar 6 01:40:51 PST 2007


On 3/4/07, svnuser at riscos.info <svnuser at riscos.info> wrote:
> Author: lee
> Date: 2007-03-04 16:59:03 +0000 (Sun, 04 Mar 2007)
> New Revision: 2546

> Modified: trunk/gcc/unixlib/source/clib/unixlib/asm_dec.s
> ===================================================================
> --- trunk/gcc/unixlib/source/clib/unixlib/asm_dec.s     2007-03-04 16:56:04 UTC (rev 2545)
> +++ trunk/gcc/unixlib/source/clib/unixlib/asm_dec.s     2007-03-04 16:59:03 UTC (rev 2546)
> @@ -358,6 +358,7 @@
>
>  GBL_MUTEX                              EQU     92
>  GBL_MALLOC_GBL                         EQU     96
> +GBL_MAIN                               EQU     100
>
>         ; Entries in the __ul_memory table.  Must be kept in sync with
>         ; sys/_syslib.s and incl-local/internal/{aof,elf}-macros.s
>
> Modified: trunk/gcc/unixlib/source/clib/unixlib/unix.h
> ===================================================================
> --- trunk/gcc/unixlib/source/clib/unixlib/unix.h        2007-03-04 16:56:04 UTC (rev 2545)
> +++ trunk/gcc/unixlib/source/clib/unixlib/unix.h        2007-03-04 16:59:03 UTC (rev 2546)
> @@ -167,6 +167,10 @@
>
>    /* The global malloc state (opaque type).  */
>    void *malloc_state;
> +
> +#if defined(__ELF__) && defined(PIC)
> +  int (*main) (int, char *[], char **);
> +#endif
>  };
>
>  /* This structure must be kept in perfect synchronisation with:

If you conditionalise the declaration here, then you want to provide
an alternative 4-byte pad for the circumstance where we are not
compiling for PIC or ELF.  Otherwise you may become out-of-step with
the GBL_ variables in asm_dec.s should we add further pointers to this
structure.

e.g.
#if defined(__ELF__) && defined(PIC)
 int (*main) (int, char *[], char **);
#else
 void *__pad1; /* To remain unused.  */
#endif


Regards,

Nick.




More information about the gcc mailing list