Share your knowledge at the LQ Wiki.
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, 07: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, 08: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-03-2008 12:20 AM
linking static libraries??? birjodh Linux - Newbie 3 06-13-2007 03:54 AM
static linking in debian? clydemaxwell Debian 0 01-10-2007 01:28 PM
static linking to c library lantern Programming 1 04-19-2004 09:58 AM
Finding and Linking Static Libraries with gcc neorich Programming 15 08-10-2003 05:03 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:00 PM.

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
Open Source Consulting | Domain Registration