11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.15 2001/10/26 19:58:12 tgl Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.16 2001/11/12 19:19:39 petere Exp $
33-->
44
55<sect2 id="dfunc">
@@ -25,6 +25,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.15 2001/10/26 19:58:12 tgl E
2525 </para>
2626
2727 <para>
28+ <indexterm><primary>PIC</></>
2829 Creating shared libraries is generally analoguous to linking
2930 executables: first the source files are compiled into object files,
3031 then the object files are linked together. The object files need to
@@ -57,6 +58,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/dfunc.sgml,v 1.15 2001/10/26 19:58:12 tgl E
5758 <variablelist>
5859 <varlistentry>
5960 <term><productname>BSD/OS</productname></term>
61+ <indexterm><primary>BSD/OS</></>
6062 <listitem>
6163 <para>
6264 The compiler flag to create <acronym>PIC</acronym> is
@@ -74,6 +76,7 @@ ld -shared -o foo.so foo.o
7476
7577 <varlistentry>
7678 <term><productname>FreeBSD</productname></term>
79+ <indexterm><primary>FreeBSD</></>
7780 <listitem>
7881 <para>
7982 The compiler flag to create <acronym>PIC</acronym> is
@@ -91,6 +94,7 @@ gcc -shared -o foo.so foo.o
9194
9295 <varlistentry>
9396 <term><productname>HP-UX</productname></term>
97+ <indexterm><primary>HP-UX</></>
9498 <listitem>
9599 <para>
96100 The compiler flag of the system compiler to create
@@ -117,6 +121,7 @@ ld -b -o foo.sl foo.o
117121
118122 <varlistentry>
119123 <term><productname>Irix</productname></term>
124+ <indexterm><primary>Irix</></>
120125 <listitem>
121126 <para>
122127 <acronym>PIC</acronym> is the default, no special compiler
@@ -132,6 +137,7 @@ ld -shared -o foo.so foo.o
132137
133138 <varlistentry>
134139 <term><productname>Linux</productname></term>
140+ <indexterm><primary>Linux</></>
135141 <listitem>
136142 <para>
137143 The compiler flag to create <acronym>PIC</acronym> is
@@ -150,6 +156,7 @@ cc -shared -o foo.so foo.o
150156
151157 <varlistentry>
152158 <term><productname>NetBSD</productname></term>
159+ <indexterm><primary>NetBSD</></>
153160 <listitem>
154161 <para>
155162 The compiler flag to create <acronym>PIC</acronym> is
@@ -167,6 +174,7 @@ gcc -shared -o foo.so foo.o
167174
168175 <varlistentry>
169176 <term><productname>OpenBSD</productname></term>
177+ <indexterm><primary>OpenBSD</></>
170178 <listitem>
171179 <para>
172180 The compiler flag to create <acronym>PIC</acronym> is
@@ -180,26 +188,9 @@ ld -Bshareable -o foo.so foo.o
180188 </listitem>
181189 </varlistentry>
182190
183- <varlistentry>
184- <term>Digital Unix/Tru64 UNIX</term>
185-
186- <listitem>
187- <para>
188- <acronym>PIC</acronym> is the default, so the compilation command
189- is the usual one. <command>ld</command> with special options is
190- used to do the linking:
191- <programlisting>
192- cc -c foo.c
193- ld -shared -expect_unresolved '*' -o foo.so foo.o
194- </programlisting>
195- The same procedure is used with GCC instead of the system
196- compiler; no special options are required.
197- </para>
198- </listitem>
199- </varlistentry>
200-
201191 <varlistentry>
202192 <term><productname>Solaris</productname></term>
193+ <indexterm><primary>Solaris</></>
203194 <listitem>
204195 <para>
205196 The compiler flag to create <acronym>PIC</acronym> is
@@ -221,8 +212,28 @@ gcc -G -o foo.so foo.o
221212 </listitem>
222213 </varlistentry>
223214
215+ <varlistentry>
216+ <term>Tru64 UNIX</term>
217+ <indexterm><primary>Tru64 UNIX</></>
218+ <indexterm><primary>Digital UNIX</><see>Tru64 UNIX</></>
219+ <listitem>
220+ <para>
221+ <acronym>PIC</acronym> is the default, so the compilation command
222+ is the usual one. <command>ld</command> with special options is
223+ used to do the linking:
224+ <programlisting>
225+ cc -c foo.c
226+ ld -shared -expect_unresolved '*' -o foo.so foo.o
227+ </programlisting>
228+ The same procedure is used with GCC instead of the system
229+ compiler; no special options are required.
230+ </para>
231+ </listitem>
232+ </varlistentry>
233+
224234 <varlistentry>
225235 <term><productname>Unixware</productname></term>
236+ <indexterm><primary>Unixware</></>
226237 <listitem>
227238 <para>
228239 The compiler flag to create <acronym>PIC</acronym> is <option>-K