🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #2313

Compiling position-independent code with gcc and gas

#2313
From: Erich Schneider
Date: Wed, 26 Jul 1995 00:00
27 lines
1789 bytes
In our lab we're having a problem compiling position-independent code 
with gcc 2.5.8 and the gas in binutils 2.5.2 running on a Sun Sparc 1000 
with SunOS 5.4. 

Normally, to compile position-independent code (for dynamically
loadable library shared objects) we have been using the -fpic flag with
gcc. However, this seems to be causing gas to be called with a 
"-K PIC" argument, causing gas to error out, complaining it can't load
an object called "PIC".

Normally, we would just use as to assemble, but SunOS 5 doesn't come
with an assembler (grumble grumble)...

If anyone out there knows how to compile position-independent code
with our configuration, we'd appreciate your help. (Or, alternately,
notice that we've made a fundamental misunderstanding with respect to
dynamically loaded libraries under SunOS 5.4.)

Thanks in advance.
--
Erich Schneider  erich@bush.cs.tamu.edu  http://bush.cs.tamu.edu/~erich

"You are a true believer. Blessings of the State; blessings of the
masses.  Thou art a subject of the Divine, created in the image of
Man, by the masses, for the masses. Let us be thankful we have
commerce. Buy more. Buy more now. Buy. And be happy."
            - Confession booth blessing, _THX-1138_
Technical Details
Message-ID: <ERICH.95Jul25193052@csdl.cs.tamu.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,f5c7916c1868421,start
X-Google-Attributes: gid11318c,public
X-Google-Thread: 1025b4,f5c7916c1868421,start
X-Google-Attributes: gid1025b4,public
From: erich@csdl.cs.tamu.edu (Erich Schneider)
Subject: Compiling position-independent code with gcc and gas
Date: 1995/07/26
Message-ID: <ERICH.95Jul25193052@csdl.cs.tamu.edu>
X-Deja-AN: 106915086
distribution: world
organization: Texas A&M University, Hypermedia Research Lab
newsgroups: gnu.misc.discuss,gnu.gcc.help