This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about using gcc and ld


On Mon, Feb 23, 2009 at 04:52:11PM +0800, Min-Hua Chen wrote:
> I don't understand why this happened. gcc calls ld to link object
> file, but why can't I
> generate the same result by using gcc and ld separately?

You can, but you need to invoke ld the same way gcc does.  gcc adds a
lot of other object files, libraries and options to the ld command
line.  Add -v to your gcc link to get a hint.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]