summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPascal Stumpf <pascal@cvs.openbsd.org>2012-08-31 08:22:16 +0000
committerPascal Stumpf <pascal@cvs.openbsd.org>2012-08-31 08:22:16 +0000
commit7133f8da523dffc211d74ae371805701ee713f60 (patch)
treefe244b78b18dae8c8d11a2a1912ac2b2e1dd0b6d /share
parent0ac60c4c82e2d7c9e3985929ed63491365d5e996 (diff)
Adapt this manpage to the removal of _pic.a libraries, restructure a bit and
correct errors: - turn the paragraph that previously talked about _pic.a libraries into a general PIC paragraph, and make it clear from the start that it is used in shared libraries as well as static libraries on PIE architectures - reorder paragraphs to first talk about .a, then _p.a, then shared libraries, then PIC - -fpic/-fPIC has nothing to do with *linking* to PIC libraries - there are no profiling versions of dynamic libraries - NOPIC now only affects shared libraries reqested by and ok deraadt@, with a tiny tweak from jmc@
Diffstat (limited to 'share')
-rw-r--r--share/man/man3/intro.351
1 files changed, 24 insertions, 27 deletions
diff --git a/share/man/man3/intro.3 b/share/man/man3/intro.3
index 11ab07f4ad5..674b28d6254 100644
--- a/share/man/man3/intro.3
+++ b/share/man/man3/intro.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: intro.3,v 1.47 2012/04/28 13:43:11 jmc Exp $
+.\" $OpenBSD: intro.3,v 1.48 2012/08/31 08:22:15 pascal Exp $
.\" $NetBSD: intro.3,v 1.5 1995/05/10 22:46:24 jtc Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)intro.3 8.1 (Berkeley) 6/5/93
.\"
-.Dd $Mdocdate: April 28 2012 $
+.Dd $Mdocdate: August 31 2012 $
.Dt INTRO 3
.Os
.Sh NAME
@@ -475,9 +475,8 @@ The system libraries are located in
Typically, a library will have a number of variants:
.Bd -unfilled -offset indent
libc.a
-libc.so.30.1
libc_p.a
-libc_pic.a
+libc.so.30.1
.Ed
.Pp
Libraries with an
@@ -494,6 +493,20 @@ can be instructed to link statically by specifying the
flag.
.Pp
Libraries with a
+.Sq _p.a
+suffix are profiling libraries.
+They contain extra information suitable for analysing programs,
+such as execution speed and call counts.
+This in turn can be interpreted by utilities such as
+.Xr gprof 1 .
+The C compiler,
+.Xr cc 1 ,
+can be instructed to generate profiling code,
+or to link with profiling libraries, by specifying the
+.Fl pg
+flag.
+.Pp
+Libraries with a
.Sq .so.X.Y
suffix are dynamic libraries.
When code is compiled dynamically, the library code that the application needs
@@ -533,34 +546,19 @@ can be instructed to link dynamically by specifying the
flag, although on systems that support it, this will be the default and
need not be specified.
.Pp
-Libraries with a
-.Sq _p.a
-suffix are profiling libraries.
-They contain extra information suitable for analysing programs,
-such as execution speed and call counts.
-This in turn can be interpreted by utilities such as
-.Xr gprof 1 .
-The C compiler,
-.Xr cc 1 ,
-can be instructed to generate profiling code,
-or to link with profiling libraries, by specifying the
-.Fl pg
-flag.
-.Pp
-Libraries with a
-.Sq _pic.a
-suffix contain position-independent code
+Shared libraries, as well as static libraries on architectures which are
+PIE
+.Pq position-independent executable
+by default, contain position-independent code
.Pq PIC .
Normally, compilers produce relocatable code.
Relocatable code needs to be modified at run-time, depending on where in
memory it is to be run.
PIC code does not need to be modified at run-time, but is less efficient than
relocatable code.
-PIC code is used by shared libraries, which can make them slower.
The C compiler,
.Xr cc 1 ,
-can be instructed to generate PIC code,
-or to link with PIC libraries, by specifying the
+can be instructed to generate PIC code by specifying the
.Fl fpic
or
.Fl fPIC
@@ -580,12 +578,11 @@ The index is created by
and can be viewed using
.Xr nm 1 .
.Pp
-The building of PIC versions of libraries and dynamic libraries can be
-prevented by setting the variable
+The building of dynamic libraries can be prevented by setting the variable
.Dv NOPIC
in
.Pa /etc/mk.conf .
-The building of profiling versions of libraries and/or dynamic libraries can
+The building of profiling versions of libraries can
be prevented by setting the variable
.Dv NOPROFILE
in