xref: /dflybsd-src/contrib/binutils-2.27/ld/README (revision e656dc90e3d65d744d534af2f5ea88cf8101ebcf)
1*a9fa9459Szrj		README for LD
2*a9fa9459Szrj
3*a9fa9459SzrjThis is the GNU linker.  It is distributed with other "binary
4*a9fa9459Szrjutilities" which should be in ../binutils.  See ../binutils/README for
5*a9fa9459Szrjmore general notes, including where to send bug reports.
6*a9fa9459Szrj
7*a9fa9459SzrjThere are many features of the linker:
8*a9fa9459Szrj
9*a9fa9459Szrj* The linker uses a Binary File Descriptor library (../bfd)
10*a9fa9459Szrj  that it uses to read and write object files.  This helps
11*a9fa9459Szrj  insulate the linker itself from the format of object files.
12*a9fa9459Szrj
13*a9fa9459Szrj* The linker supports a number of different object file
14*a9fa9459Szrj  formats.  It can even handle multiple formats at once:
15*a9fa9459Szrj  Read two input formats and write a third.
16*a9fa9459Szrj
17*a9fa9459Szrj* The linker can be configured for cross-linking.
18*a9fa9459Szrj
19*a9fa9459Szrj* The linker supports a control language.
20*a9fa9459Szrj
21*a9fa9459Szrj* There is a user manual (ld.texinfo), as well as the
22*a9fa9459Szrj  beginnings of an internals manual (ldint.texinfo).
23*a9fa9459Szrj
24*a9fa9459SzrjInstallation
25*a9fa9459Szrj============
26*a9fa9459Szrj
27*a9fa9459SzrjSee ../binutils/README.
28*a9fa9459Szrj
29*a9fa9459SzrjIf you want to make a cross-linker, you may want to specify
30*a9fa9459Szrja different search path of -lfoo libraries than the default.
31*a9fa9459SzrjYou can do this by setting the LIB_PATH variable in ./Makefile
32*a9fa9459Szrjor using the --with-lib-path configure switch.
33*a9fa9459Szrj
34*a9fa9459SzrjTo build just the linker, make the target all-ld from the top level
35*a9fa9459Szrjdirectory (one directory above this one).
36*a9fa9459Szrj
37*a9fa9459SzrjPorting to a new target
38*a9fa9459Szrj=======================
39*a9fa9459Szrj
40*a9fa9459SzrjSee the ldint.texinfo manual.
41*a9fa9459Szrj
42*a9fa9459SzrjReporting bugs etc
43*a9fa9459Szrj===========================
44*a9fa9459Szrj
45*a9fa9459SzrjSee ../binutils/README.
46*a9fa9459Szrj
47*a9fa9459SzrjKnown problems
48*a9fa9459Szrj==============
49*a9fa9459Szrj
50*a9fa9459SzrjThe Solaris linker normally exports all dynamic symbols from an
51*a9fa9459Szrjexecutable.  The GNU linker does not do this by default.  This is
52*a9fa9459Szrjbecause the GNU linker tries to present the same interface for all
53*a9fa9459Szrjsimilar targets (in this case, all native ELF targets).  This does not
54*a9fa9459Szrjmatter for normal programs, but it can make a difference for programs
55*a9fa9459Szrjwhich try to dlopen an executable, such as PERL or Tcl.  You can make
56*a9fa9459Szrjthe GNU linker export all dynamic symbols with the -E or
57*a9fa9459Szrj--export-dynamic command line option.
58*a9fa9459Szrj
59*a9fa9459SzrjHP/UX 9.01 has a shell bug that causes the linker scripts to be
60*a9fa9459Szrjgenerated incorrectly.  The symptom of this appears to be "fatal error
61*a9fa9459Szrj- scanner input buffer overflow" error messages.  There are various
62*a9fa9459Szrjworkarounds to this:
63*a9fa9459Szrj  * Build and install bash, and build with "make SHELL=bash".
64*a9fa9459Szrj  * Update to a version of HP/UX with a working shell (e.g., 9.05).
65*a9fa9459Szrj  * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in
66*a9fa9459Szrj    genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the
67*a9fa9459Szrj    emulparams script used exports any shell variables it sets.
68*a9fa9459Szrj
69*a9fa9459SzrjCopyright (C) 2012-2016 Free Software Foundation, Inc.
70*a9fa9459Szrj
71*a9fa9459SzrjCopying and distribution of this file, with or without modification,
72*a9fa9459Szrjare permitted in any medium without royalty provided the copyright
73*a9fa9459Szrjnotice and this notice are preserved.
74