summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld/ld.1
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/ld/ld.1')
-rw-r--r--contrib/binutils/ld/ld.123
1 files changed, 18 insertions, 5 deletions
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
index 79d5d65..9d7a53e 100644
--- a/contrib/binutils/ld/ld.1
+++ b/contrib/binutils/ld/ld.1
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
@@ -21,7 +21,6 @@
..
.de Ve \" End verbatim text
.ft R
-
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
@@ -129,10 +128,9 @@
.\" ========================================================================
.\"
.IX Title "LD 1"
-.TH LD 1 "2002-08-05" "binutils-2.12.91" "GNU Development Tools"
-.UC
+.TH LD 1 "2002-10-30" "binutils-2.13" "GNU Development Tools"
.SH "NAME"
-ld \- Using \s-1LD\s0, the \s-1GNU\s0 linker
+ld \- Using LD, the GNU linker
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
ld [\fBoptions\fR] \fIobjfile\fR ...
@@ -177,6 +175,7 @@ link a file \f(CW\*(C`hello.o\*(C'\fR:
.Vb 1
\& ld -o <output> /lib/crt0.o hello.o -lc
.Ve
+.PP
This tells \fBld\fR to produce a file called \fIoutput\fR as the
result of linking the file \f(CW\*(C`/lib/crt0.o\*(C'\fR with \f(CW\*(C`hello.o\*(C'\fR and
the library \f(CW\*(C`libc.a\*(C'\fR, which will come from the standard search
@@ -242,6 +241,7 @@ compiler driver) like this:
.Vb 1
\& gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
.Ve
+.PP
This is important, because otherwise the compiler driver program may
silently drop the linker options, resulting in a bad link.
.PP
@@ -958,6 +958,11 @@ shared libraries is normal since the kernel patches them at load time to
select which function is most appropriate for the current architecture.
I.E. dynamically select an appropriate memset function. Apparently it
is also normal for \s-1HPPA\s0 shared libraries to have undefined symbols.
+.IP "\fB\-\-no\-undefined\-version\fR" 4
+.IX Item "--no-undefined-version"
+Normally when a symbol has an undefined version, the linker will ignore
+it. This option disallows symbols with undefined version and a fatal error
+will be issued instead.
.IP "\fB\-\-no\-warn\-mismatch\fR" 4
.IX Item "--no-warn-mismatch"
Normally \fBld\fR will give an error if you try to link together input
@@ -1350,6 +1355,7 @@ Here is a trivial example:
\& return __real_malloc (c);
\& }
.Ve
+.Sp
If you link other code with this file using \fB\-\-wrap malloc\fR, then
all calls to \f(CW\*(C`malloc\*(C'\fR will call the function \f(CW\*(C`_\|_wrap_malloc\*(C'\fR
instead. The call to \f(CW\*(C`_\|_real_malloc\*(C'\fR in \f(CW\*(C`_\|_wrap_malloc\*(C'\fR will
@@ -1566,6 +1572,7 @@ a variable, or b) make the 'constant' index a variable. Thus:
\& extern_array[1] -->
\& { volatile type *t=extern_array; t[1] }
.Ve
+.Sp
or
.Sp
.Vb 3
@@ -1573,6 +1580,7 @@ or
\& extern_array[1] -->
\& { volatile int t=1; extern_array[t] }
.Ve
+.Sp
For structs (and most other multiword data types) the only option
is to make the struct itself (or the long long, or the ...) variable:
.Sp
@@ -1581,6 +1589,7 @@ is to make the struct itself (or the long long, or the ...) variable:
\& extern_struct.field -->
\& { volatile struct s *t=&extern_struct; t->field }
.Ve
+.Sp
or
.Sp
.Vb 3
@@ -1588,6 +1597,7 @@ or
\& extern_ll -->
\& { volatile long long * local_ll=&extern_ll; *local_ll }
.Ve
+.Sp
A second method of dealing with this difficulty is to abandon
\&'auto\-import' for the offending symbol and mark it with
\&\f(CW\*(C`_\|_declspec(dllimport)\*(C'\fR. However, in practice that
@@ -1608,6 +1618,7 @@ Original:
\& printf("%d\en",arr[1]);
\& }
.Ve
+.Sp
Solution 1:
.Sp
.Vb 9
@@ -1621,6 +1632,7 @@ Solution 1:
\& printf("%d\en",parr[1]);
\& }
.Ve
+.Sp
Solution 2:
.Sp
.Vb 14
@@ -1639,6 +1651,7 @@ Solution 2:
\& printf("%d\en",arr[1]);
\& }
.Ve
+.Sp
A third way to avoid this problem is to re-code your
library to use a functional interface rather than a data interface
for the offending variables (e.g. \fIset_foo()\fR and \fIget_foo()\fR accessor
OpenPOWER on IntegriCloud