🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53582

difference between "ld *.o" vs. "gcc *.o" ??

#53582
From: Jeff Lin
Date: Thu, 31 Oct 1991 03:17
27 lines
1414 bytes
Hi,

I just finished installing the gnu gcc on my SUN sparc II, 
and wanting to test if the object file format of gcc is
compatible with cc(1), and I ran into a beginner question
that has really puzzle me to death. 

I built two sets of object files using CC(1) for one, and
gcc for the other. Now if I use the SUN-supplied ld to 
link edit them like "ld  cc*.o gcc*.o", my executable
is damaged (in my case, I received a Segmentation fault
error).

But if I use either "cc cc*.o gcc*.o" or "gcc cc*.o gcc*.o",
the executable built will work. I certainly never ran into
this problem before when all my object files are all built
under one compiler. I wonder if you can shed some light
on my puzzle, and also to my question, i.e. are GCC and
sun's CC generate object files of the format ?


Thanks a lot,



Jeff Lin
linj@texaco.com
Technical Details
Message-ID: <9110310317.AA09510@Texaco.COM>
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!texaco.com!linj

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,37fe2de5ee579981,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-11-03 08:26:54 PST
Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!texaco.com!linj
From: linj@texaco.com (Jeff Lin)
Newsgroups: gnu.gcc.help
Subject: difference between "ld *.o" vs. "gcc *.o" ??
Message-ID: <9110310317.AA09510@Texaco.COM>
Date: 31 Oct 91 03:17:02 GMT
Sender: gnulists@ai.mit.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 27