Mail Archives: djgpp/1996/07/04/21:24:25
Reply to message 2392847 from DMICOLET AT U-BO on 07/04/96 9:42AM
>It compiles fine, but does not link : I got the folowing :
>e:/miko/trash/essai.o : could not read symbols : Bad value.
>
>If I reduce the size of the array to 1024*1024*15, the linking is OK.
>So my question : is there a maximum length for a static array ?
>Curiously my computer has 16 M of memory : is there a connexion ?
This is a known bug in ld; it can't compile static arrays that are larger
than a certain value. I thought it was 4 MB, but your example seems
to indicate otherwise. You're welcome to attempt to fix ld yourself if
you like, or wait for the next DJGPP release. :)
In the meantime, you can always impress your friend with something like
this:
int main( void )
{
char *Mega;
if ( ( Mega = (char *) malloc( 1024*1024*64 ) ) != NULL )
printf( "Allocated 64MB for Mega.\n" );
return 0;
}
Just make sure you have lots of free disk space (50 MB or so) before trying it.
;)
John
- Raw text -