Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 0
static linking in gcc

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

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

will do the trick


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 11:48 AM.

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