LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-27-2009, 06:46 AM   #1
lavixu
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
static linking in gcc


Hi,
I want to link a .elf file statically in GCC. what are the options available?
 
Old 11-27-2009, 07:07 AM   #2
GooseYArd
Member
 
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
Quote:
Originally Posted by lavixu View Post
Hi,
I want to link a .elf file statically in GCC. what are the options available?
gcc -static

will do the trick
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc errors on static, but NOT dynamic, linking MALDATA Programming 5 10-02-2008 11:20 PM
linking static libraries??? birjodh Linux - Newbie 3 06-13-2007 02:54 AM
static linking in debian? clydemaxwell Debian 0 01-10-2007 12:28 PM
static linking to c library lantern Programming 1 04-19-2004 08:58 AM
Finding and Linking Static Libraries with gcc neorich Programming 15 08-10-2003 04:03 PM


All times are GMT -5. The time now is 06:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration