Hi, I am having a strange problem with EGCS (upgraded to egcs-1.1.2-13) on RedHat 6.0/SPARC. I first encountered it when attempting to build Kerberos (krb5-1.0.6). Excerpts from the build log: gcc -g -O -DHAVE_LIBNSL=1 -DKRB5_KRB4_COMPAT -I./../../../include -I../../../../src/lib/crypto/crc32/../../../include -I./../../../include/krb5 -I../../../../src/lib/crypto/crc32/../../../include/krb5 -c ../../../../src/lib/crypto/crc32/crc.c [...] + ./../../util/libupdate --force libcrypto.a DONE des md4 md5 sha crc32 os . Updating library libcrypto.a from des/DONE md4/DONE md5/DONE sha/DONE crc32/DONE os/DONE ./DONE BFD: crc32/crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' BFD: crc32/crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' BFD: crc32/crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' BFD: crc32/crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' [...] ranlib libcrypto.a BFD: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' BFD: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' BFD: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' BFD: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' [...] gcc -L./../../../lib -L./../../../lib -o client client.o rpc_test_clnt.o -lgssrpc -lgssapi_krb5 -lkrb5 -lcrypto -ldyn -lcom_err -lnsl collect2: ld terminated with signal 11 [Segmentation fault] /usr/bin/ld: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' /usr/bin/ld: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' /usr/bin/ld: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' /usr/bin/ld: crc.o: invalid string offset 201326592 >= 115 for section `.shstrtab' This version of Kerberos builds just fine using EGCS 1.1.2 under Solaris. I then tried building the EGCS 1.1.2 distribution on RH 6.0 and hit a similar-looking problem (again excerpted from the build log): gcc -DIN_GCC -g -O2 -DHAVE_CONFIG_H -DHAIFA -o gencodes \ gencodes.o rtl.o bitmap.o print-rtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` collect2: ld terminated with signal 11 [Segmentation fault] This crash doesn't happen if I first apply the patches in egcs-1.1.2-13.src.rpm. I'm not sure what to make of this -- my suspicion is that the bug is simply being masked by the patches. I mean, `ld' shouldn't take a SEGV on *any* `gcc' output, should it? Anyway, for Kerberos sources look at ftp://athena-dist.mit.edu/pub/kerberos/README.KRB5-1.0.6 -- Scott
Although it is, of course, a bug for ld to dump core on any input, it does reduce the severity if this doesn't happen with egcs-1.1.2-13 and later. If you want to pursue the ld bug further I'd look at http://sourceware.cygnus.com/binutils
Please submit (as an attachment in bugzilla) a self-contained test case (normally this means the output of gcc -E for a single source file along with instructions for making the problem happen). You also may want to try Red Hat Linux 6.1 (which is out for sparc as of a few days ago, on our FTP site), not that I have a specific bug fix in mind when I say that. Scott L. Burson writes: I'm sorry, I didn't explain the situation very well. I am unable to build Kerberos, period. I tried building EGCS as a further experiment, and thought it was interesting that I ran into the same problem only when I didn't apply the patches, but in retrospect this fact is probably accidental and irrelevant. It is certainly true that the bug could be in `ld' rather than `gcc', but at this point I don't see any way to know, short of manually checking the `.o' files against the ELF specification. Anyway, I'm sorry my explanation was unclear, but no, this problem is not resolved.
Putting this in WORKSFORME until I have a test case (again, that would typically mean gcc -E output together with a description of what is wrong with it). ------- Email Received From "Scott L. Burson" <gyro> 12/07/99 18:13 -------