Article View: comp.lang.asm.x86
Article #147Re: How to link HelloWorld.O (created by GCC) ??
From: Jerry Heyman
Date: Wed, 21 May 2003 19:32
Date: Wed, 21 May 2003 19:32
30 lines
2717 bytes
2717 bytes
Hans wrote:
> Hello,
>
> I have written HelloWorld.c and compiled to assembly using GCC. (so I can
> study the assembly).
>
> Using AS I have assembled HelloWorld.s to HelloWorld.O
>
> But how to link HelloWorld.O to HelloWorld Executable? Which minimal
> command line options do I need to use to link? The Linker is complaining
> about the Printf call. Against which and HOW sharedlibrary stub do I need
> to link HelloWorld.O?
Have you tried 'gcc -v HelloWorld.c'?
That would show you each step that the compiler does -
including the as and ld steps. Also all the libraries
that are involved (also crt.o)
>
> Thanks!
>
> Hans
jerry
--
Jerry Heyman 919.224.1442 | IBM SWG/Tivoli Software|"Software is the
Build Infrastructure Architect | 3901 S Miami Blvd | difference between
jheyman@us.ibm.com | Durham, NC 27703 | hardware and reality"
http://www.cs.stedwards.edu/~heyman
Technical Details
Message-ID:
<bagk2d$e5k$1@ausnews.austin.ibm.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mailReferences:
<bagdiq$ol1$1@news4.tilbu1.nb.home.nl>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f65d0,3e6e7567159c8b7a X-Google-Attributes: gidf65d0,public X-Google-Thread: 114917,3e6e7567159c8b7a X-Google-Attributes: gid114917,public X-Google-ArrivalTime: 2003-05-21 14:33:00 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!news.crayne.org!clax86!robomod!not-for-mail From: Jerry Heyman <jheyman@us.ibm.com> Newsgroups: comp.lang.asm.x86,gnu.gcc Subject: Re: How to link HelloWorld.O (created by GCC) ?? Approved: CLAX86 Moderators <ccrayne@crayne.org> Followup-To: comp.lang.asm.x86 Date: Wed, 21 May 2003 15:32:18 -0400 Organization: IBM SWG/Tivoli Software Message-ID: <bagk2d$e5k$1@ausnews.austin.ibm.com> X-CLAX86-Policy: http://www.pacificsites.com/~ccrayne/clax86.html X-CLAX86-Faq: http://www2.dgsys.com/~raymoon/x86faqs.html X-CLAX86-Info-1: Send submissions to comp-lang-asm-x86@moderators.isc.org X-CLAX86-Info-2: Send technical complaints to ccrayne@crayne.org X-CLAX86-Info-3: Send complaints about policy to ccrayne@crayne.org X-Comment: moderators do not necessarily agree or disagree with this article. References: <bagdiq$ol1$1@news4.tilbu1.nb.home.nl> Reply-To: jheyman@us.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.7.1 X-MailScanner: Found to be clean X-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-1.5, required 5, NOSPAM_INC, QUOTED_EMAIL_TEXT, REFERENCES, SIGNATURE_SHORT_DENSE, SPAM_PHRASE_00_01, USER_AGENT) X-UIDL: Vcd"!;mF!!SCA"!5OC"! X-Complaints-To: abuse@supernews.com Lines: 32