Bug 5853 - EGCS writing bad .o files
Summary: EGCS writing bad .o files
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: egcs
Version: 6.0
Hardware: sparc
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-10-12 00:29 UTC by gyro
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-12-07 22:36:07 UTC
Embargoed:


Attachments (Terms of Use)

Description gyro 1999-10-12 00:29:51 UTC
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

Comment 1 Jim Kingdon 1999-11-22 19:16:59 UTC
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

Comment 2 Jim Kingdon 1999-11-22 21:31:59 UTC
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.

Comment 3 Jim Kingdon 1999-12-07 22:36:59 UTC
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 -------


Note You need to log in before you can comment on or make changes to this bug.