Harmonize another ELF linker option: ignore export-dynamic in the COFF linker.
Elaborate on some of the ELF option descriptions, and don't say the options are ignored...this man page is the one installed on ELF systems, too.
This commit is contained in:
parent
9043581b85
commit
9535b6c2a3
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: ld.1,v 1.14 1998/02/20 03:12:50 jonathan Exp $
|
||||
.\" $NetBSD: ld.1,v 1.15 1998/07/25 11:58:49 ross Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1993 Paul Kranenburg
|
||||
.\" All rights reserved.
|
||||
|
@ -218,10 +218,9 @@ Make a
|
|||
.Dv ZMAGIC
|
||||
output file. This is the default.
|
||||
.Sh
|
||||
The following long options are exceptions to the normal option syntax
|
||||
described above, and are provided for compatibility with later versions of
|
||||
GNU
|
||||
.Nm ld ":"
|
||||
Use of the following directives is required on ELF systems and is
|
||||
recommended on all others
|
||||
in order to prepare for the planned transition from COFF to ELF.
|
||||
.Bl -tag -width indent
|
||||
.It Fl rpath Ar dir
|
||||
Record the given
|
||||
|
@ -229,17 +228,20 @@ Record the given
|
|||
within the executable for run-time library
|
||||
search, as for
|
||||
.Fl R "."
|
||||
This only applies to dynamically linked executables.
|
||||
Ignored on COFF systems.
|
||||
.It Fl shared
|
||||
Instructs the linker to build a shared object from the object files rather
|
||||
than a normal executable image.
|
||||
.It Fl soname Ar library-name
|
||||
This option and its
|
||||
.Ar libraryname
|
||||
argument are ignored. They are provided for compatibility with versions of
|
||||
.Nm ld ","
|
||||
which allow the user to specify an internal name and version number
|
||||
for dynamically-linked shared libraries.
|
||||
The linker input file name is usually the plain ``.so'' file with
|
||||
no version number.
|
||||
On ELF systems, this option sets the DT_SONAME field
|
||||
of a shared library to
|
||||
.Ar libraryname,
|
||||
which should be specified with the major number and without the minor
|
||||
number. A program image linked with this library will
|
||||
use at run time the file name specified here rather than the linker input
|
||||
file name.
|
||||
.It Fl Fl whole-archive
|
||||
A positional qualifier to force loading from archives.
|
||||
For each archive mentioned on the commandline after this option,
|
||||
|
@ -256,6 +258,11 @@ This option should turn off the effect of a preceding
|
|||
.Fl Fl whole-archive
|
||||
for any subsequent archive files on the command line.
|
||||
It is currently ignored.
|
||||
.It Fl Fl export-dynamic
|
||||
Specifies that all symbols should be added to the
|
||||
dynamic symbol table. Enables shared libraries to dynamically link
|
||||
to application symbols.
|
||||
Ignored on COFF systems.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
.Nm
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ld.c,v 1.52 1998/02/20 03:12:51 jonathan Exp $ */
|
||||
/* $NetBSD: ld.c,v 1.53 1998/07/25 11:58:49 ross Exp $ */
|
||||
|
||||
/*-
|
||||
* This code is derived from software copyrighted by the Free Software
|
||||
|
@ -662,6 +662,11 @@ decode_option(swt, arg)
|
|||
if (!strcmp(swt + 1, "assert"))
|
||||
return;
|
||||
#ifdef GNU_BINUTIL_COMPAT
|
||||
if (strcmp(swt + 1, "-export-dynamic") == 0) {
|
||||
if (warn_forwards_compatible_inexact)
|
||||
warnx("%s ignored", swt + 1);
|
||||
return;
|
||||
}
|
||||
if (strcmp(swt + 1, "-whole-archive") == 0) {
|
||||
/* XXX incomplete emulation */
|
||||
link_mode |= FORCEARCHIVE;
|
||||
|
|
Loading…
Reference in New Issue