Article View: gnu.gcc.help
Article #908Re: Can gcc produce position-independent object code for shared libraries?
From: Michael Salmon
Date: Thu, 28 Jan 1993 09:33
Date: Thu, 28 Jan 1993 09:33
29 lines
1593 bytes
1593 bytes
In article <1993Jan26.214222.3324@is.morgan.com>
jlieb@is.morgan.com (Jerry Liebelson) writes:
|> Or, what's the gcc equivalent of the cc -pic option for use with
|> compiling modules for subsequent linking into a SunOS 4.11 shared library?
|>
|> Please answer from actual experience, thank you.
From the man page (and actual experience with SunOS 4.1.1):
-fpic
If supported for the target machines, generate
position-independent code, suitable for use in a shared
library.
-fPIC
If supported for the target machine, emit position-
independent code, suitable for dynamic linking, even if
branches need large displacements.
--
Michael Salmon
#include <standard.disclaimer>
#include <witty.saying>
#include <fancy.pseudo.graphics>
Ericsson Telecom AB
Stockholm
Technical Details
Message-ID:
<1993Jan28.093317.2547@ericsson.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!sics.se!eua.ericsson.se!ericom!eos.ericsson.se!etxmesaReferences:
<1993Jan26.214222.3324@is.morgan.com>Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!newsserver.jvnc.net!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sunic!sics.se!eua.ericsson.se!ericom!eos.ericsson.se!etxmesa From: etxmesa@eos.ericsson.se (Michael Salmon) Subject: Re: Can gcc produce position-independent object code for shared libraries? Message-ID: <1993Jan28.093317.2547@ericsson.se> Keywords: gcc gnu shared -pic Sender: news@ericsson.se Nntp-Posting-Host: eos6c02.ericsson.se Reply-To: etxmesa@eos.ericsson.se (Michael Salmon) Organization: Ericsson Telecom AB References: <1993Jan26.214222.3324@is.morgan.com> Date: Thu, 28 Jan 1993 09:33:17 GMT Lines: 29