Bug 119661 - gcc aborts when linking with libjvm.so
gcc aborts when linking with libjvm.so
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
rawhide
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks: FC2Target
  Show dependency treegraph
 
Reported: 2004-04-01 01:23 EST by Claus Olesen
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-27 07:42:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Claus Olesen 2004-04-01 01:23:15 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)

Description of problem:
gcc aborts prematurely when linking with libjvm.so

Version-Release number of selected component (if applicable):
gcc version 3.3.3 20040311 (Red Hat Linux 3.3.3-3)

How reproducible:
Always

Steps to Reproduce:
1.
Create a minimal c program named abc.c, for example
int main()
{
  return 0;
}

2.
Build the program, linking with libjvm.so (allthough not needed), using the command
gcc -L/j2sdk1.4.2_04/jre/lib/i386/server -o abc abc.c -ljvm

3.
That's it.
    

Actual Results:  collect2: ld terminated with signal 11 [Segmentation fault]

Expected Results:  gcc should have produced executable abc and printed no messages.

Additional info:

Redhat 9 does not exhibit this problem. Still, maybe the problem instead is with libjvm.so.
Comment 1 Jakub Jelinek 2004-04-01 02:16:21 EST
It is apparently the linker, not gcc that segfaults.
What exact version ofbinutils do you have?
Comment 2 Claus Olesen 2004-04-01 02:36:35 EST
rpm -qa | grep binutils 
binutils-2.15.90.0.1.1-2 
 
ld -v 
GNU ld version 2.15.90.0.1.1 20040326 
Comment 3 Claus Olesen 2004-04-08 22:35:14 EDT
As workaround I downgraded from binutils-2.15.90.0.1.1-2 to 
binutils-2.14.90.0.8-8.1. After that ld as invoked by gcc complained 
that "-as--needed" is unrecognized. This appears to be a new option 
passed from gcc to ld. I did not downgrade gcc but left it at 
gcc-3.3.3-6. Instead I edited out "-as--needed" and "--no-as-needed" 
in /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs. Don't know if 
that's valid. But with this the problem appears to have vanished. 
Comment 4 Jakub Jelinek 2004-05-27 07:42:24 EDT
I don't see this problem in binutils-2.15.90.0.3-5 (FC2).

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