ken@csis.dit.csiro.au (Ken Yap) (12/11/90)
I keep seeing queries about why g++ won't work under SunOS 4.1 because the generated binaries segfault, etc. I'm dismayed that archive keepers at FSF and elsewhere haven't seen fit to put this fix in a file with a prominent name like SunOS4.1-gld-bugfix. Here is the one line fix for the problem. Better fixes probably exist but this one worked for me. I believe the ld.c in binutils works properly too. RCS file: ld.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** /tmp/,RCSt1a16443 Tue Dec 11 12:29:07 1990 --- /tmp/,RCSt2a16443 Tue Dec 11 12:29:08 1990 *************** *** 1004,1009 **** --- 1004,1010 ---- This depends on the kind of system and on the output format selected. */ N_SET_MAGIC (outheader, magic); + outheader.a_entry = PAGSIZ; /* SunOS 4.1 bug */ #ifdef INITIALIZE_HEADER INITIALIZE_HEADER; #endif