[Beowulf] broken binutils (was: Redmond is at it, again)

Michael Will mwill at penguincomputing.com
Fri Jun 18 14:12:13 PDT 2004

Why again did you prefer a[....] over *a = malloc(...) ? 

On Friday 18 June 2004 01:40 pm, Martin Siegert wrote:
> On Thu, Jun 17, 2004 at 10:34:28PM -0700, Greg Lindahl wrote:
> > ... until the day that it actually is a kernel or glibc bug. "Oh, we
> > don't really support that OS, you have to upgrade to something
> > different." "I'm sorry, but that distro has a broken binutils, so
> > programs with large common blocks simply can't be compiled, and we
> > aren't going to even think about doing a workaround because not enough
> > of our users use that distro." And it goes downhill from there.
> >
> > -- greg
> Since you mentioned this: I am struggling with binutils right now.
> Basically I am considering the following program:
> double a[117403096];
> int main(){}
> gdb tells me that &a[117403095] is at 0x3ffffff8 and ldd tells me
> that ld-linux.so.2 is at 0x40000000 (as always).
> Thus, when I compile
> double a[117403097];
> int main(){}
> ldd and a.out segfault because &a[117403096] overwrites the address
> of the run-time linker (on your system you may have to change 117403096
> a little bit). Arrgh. This means that you can only use about 1GB of
> memory in programs with statically allocated arrays (which is mostly
> a problem with old fashioned F77 programs). The workaround is to compile
> with the -static flag so that you actually can safely overwrite the
> 0x40000000 address.
> Now on a SuSE-9.1 box (with binutils-, gcc-3.3.3, 2.6.4
> kernel) This problem disappears: When I compile
> double a[117403097];
> int main(){}
> and the run "ldd a.out" it says "not a dynamic executable" even when
> compiling without the -static flag. My first guess was that I just
> have to upgrade ld to the 2.15 version, but after upgrading binutils
> on a SuSE-9.0 box (gcc-3.3.1, 2.4.26 kernel) to exactly the same
> version this does not fix the problem, i.e., ldd and a.out
> still segfault. Thus: what is broken here? Do I need to upgrade gcc and/or
> the kernel as well?
> Cheers,
> Martin
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit
> http://www.beowulf.org/mailman/listinfo/beowulf

Michael Will, Linux Sales Engineer
NEWS: We have moved to a larger iceberg :-)
NEWS: 300 California St., San Francisco, CA.
Tel:  415-954-2822  Toll Free:  888-PENGUIN
Fax:  415-954-2899 

More information about the Beowulf mailing list