AMD64 x86 Linux; f77 trouble with loader ?
Murakami Hiroshi
dm@tmca.ac.jp
Sun Jan 11 14:13:00 GMT 2004
Dear, GCC bugs,
This bug is about f77 for the AMD64 x64 on Linux
(for example Mandrake Linux for AMD64).
The bug sample source code is compiled with f77
with -c option to give a.o file fine.
However, the loader (linker) gives error message
and the a.out file is not made.
(It seems the linker thinks the .bss area is no more
than 4GB?)
message from the linker is like:
>: relocation truncated to fit: R_X86_64_32S .bss
>collect2: ld returned 1 exit status
This kind of bug makes the fortran very inconvenient
and kills the 64bit address's advantage.
Since, the fortran77 does not have the dynamic array
allocation mechanizm, the total array size limitation
of just about 4GB makes the fortran user quite sad.
Hiroshi Murakami
<dm@tmca.ac.jp>
Script started on Sun 11 Jan 2004 11:01:07 PM EST
$
$
$ f77 -v
Reading specs from /usr/lib64/gcc-lib/amd64-mandrake-linux-gnu/3.3.1/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib64
--with-slibdir=/lib64 --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking
--enable-long-long --enable-__cxa_atexit
--enable-languages=c,c++,ada,f77,objc,java,pascal
--host=amd64-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-4mdk)
$
$
$ f77 -c a.f
$
$
$ f77 a.o
a.o(.text+0x154): In function `MAIN__':
: relocation truncated to fit: R_X86_64_32S .bss
a.o(.text+0x183): In function `MAIN__':
: relocation truncated to fit: R_X86_64_32S .bss
collect2: ld returned 1 exit status
$
$
$ cat a.f
*========================================
*
* This is compiled fine with $ f77 -c a.f to give a.o file.
* However, the loader (linker) gives error message and
* the a.out file is not made.
* (It seems the linker thinks the bss area is no more
* than 4GB?)
*
program main
implicit none
integer mb,n
parameter(mb=1024*1024/8,n=1000)
integer i,j
* These arrays are 1000MB each in size.
real*8 x1(mb,n)
real*8 x2(mb,n)
real*8 x3(mb,n)
real*8 x4(mb,n)
real*8 x5(mb,n)
do j=1,n
print *, '< ',j
do i=1,mb
x1(i,j)=i+j
x2(i,j)=i-j
x3(i,j)=i*j
x4(i,j)=i/j
x5(i,j)=i-2*j
enddo
enddo
end
*========================================
$ exit
exit
Script done on Sun 11 Jan 2004 11:01:34 PM EST
More information about the Gcc-bugs
mailing list