LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-07-2006, 03:43 AM   #1
George2
Member
 
Registered: Oct 2003
Posts: 354

Rep: Reputation: 30
about -shared option in gcc


lo everyone,


I have used -shared options for a long time. Today
when I dig into the detailed description of shared
option of gcc, I found something strange to me.

Quote from gcc man page,

--------------------
-shared
Produce a shared object which can then be linked with
other objects to form an executable. Not all systems
support this option. For predictable results, you must
also specify the same set of options that were used to
generate code (-fpic, -fPIC, or model suboptions) when
you specify this option.[1]

1.
On some systems, gcc -shared needs to build
supplementary stub code for constructors to work. On
multi-libbed systems, gcc -shared must select the
correct support libraries to link against. Failing to
supply the correct flags may lead to subtle defects.
Supplying them in cases where they are not necessary
is innocuous.
--------------------

I only understand this statement "Produce a shared
object which can then be linked with other objects to
form an executable." and I do not know what are the
other points mean.

Could anyone help to introduce what do they mean and
will the points impact my current work/previous
comprehension of shared option of gcc?


regards,
George
 
  


Reply



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 unrecognized option ruben22 Linux From Scratch 9 11-12-2008 04:41 AM
what does the option -s of gcc mean ? hongxing Linux - Software 3 11-28-2005 08:12 PM
gcc option -E use. niverson Programming 2 10-11-2004 04:06 PM
a shared win/lin partition. fat32 my only option? murray_linux Slackware 9 06-15-2004 03:57 AM
php mcrypt shared configuration option Pete Dogg Linux - Software 1 02-22-2004 12:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:40 PM.

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