This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Object file for Module is too large
- From: FX <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc at gcc dot gnu dot org
- Cc: alisonboeckmann at fastmail dot fm
- Date: Tue, 12 May 2009 14:03:28 +0200
- Subject: Re: Object file for Module is too large
Hi Alison,
This issue is not specific to Fortran, but it's specific to Darwin
(you say that "the large object files have been observed on many other
platforms", but could you give a list of such platforms?):
$ cat a.c
int x[9999999] = { 0 };
$ gcc -c a.c && ls -lh a.o
-rw-r--r-- 1 fx wheel 38M May 12 13:43 a.o
$ size a.o
__TEXT __DATA __OBJC others dec hex
0 39999996 0 0 39999996 26259fc
while on x86_64-linux, I get:
$ cat a.c
int x[9999999] = { 0 };
$ gcc -c a.c && ls -lh a.o
-rw-r--r-- 1 fx fx 959 May 12 13:44 a.o
$ size a.o
text data bss dec hex filename
0 0 39999996 39999996 26259fc a.o
The different between the two is between .bss (x86_64-linux) and .data
(darwin). I don't know enough about Mach-O to tell if it's a bug or a
feature :)
FX