1213700Smm		README for LD
2213700Smm
3213700SmmThis is the GNU linker.  It is distributed with other "binary
4213700Smmutilities" which should be in ../binutils.  See ../binutils/README for
5207753Smmmore general notes, including where to send bug reports.
6207753Smm
7207753SmmThere are many features of the linker:
8207753Smm
9213700Smm* The linker uses a Binary File Descriptor library (../bfd)
10213700Smm  that it uses to read and write object files.  This helps
11207753Smm  insulate the linker itself from the format of object files.
12207753Smm
13213700Smm* The linker supports a number of different object file
14207753Smm  formats.  It can even handle multiple formats at once:
15207753Smm  Read two input formats and write a third.
16207753Smm
17207753Smm* The linker can be configured for cross-linking.
18207753Smm
19207753Smm* The linker supports a control language.
20207753Smm
21213700Smm* There is a user manual (ld.texinfo), as well as the
22207753Smm  beginnings of an internals manual (ldint.texinfo).
23207753Smm
24207753SmmInstallation
25207753Smm============
26213700Smm
27207753SmmSee ../binutils/README.
28207753Smm
29207753SmmIf you want to make a cross-linker, you may want to specify
30207753Smma different search path of -lfoo libraries than the default.
31213700SmmYou can do this by setting the LIB_PATH variable in ./Makefile
32213700Smmor using the --with-lib-path configure switch.
33207753Smm
34213700SmmTo build just the linker, make the target all-ld from the top level
35207753Smmdirectory (one directory above this one).
36213700Smm
37213700SmmPorting to a new target
38213700Smm=======================
39213700Smm
40207753SmmSee the ldint.texinfo manual.
41207753Smm
42207753SmmReporting bugs etc
43207753Smm===========================
44207753Smm
45207753SmmSee ../binutils/README.
46213700Smm
47213700SmmKnown problems
48207753Smm==============
49213700Smm
50207753SmmThe Solaris linker normally exports all dynamic symbols from an
51207753Smmexecutable.  The GNU linker does not do this by default.  This is
52207753Smmbecause the GNU linker tries to present the same interface for all
53213700Smmsimilar targets (in this case, all native ELF targets).  This does not
54207753Smmmatter for normal programs, but it can make a difference for programs
55207753Smmwhich try to dlopen an executable, such as PERL or Tcl.  You can make
56207753Smmthe GNU linker export all dynamic symbols with the -E or
57207753Smm--export-dynamic command line option.
58213700Smm
59207753SmmHP/UX 9.01 has a shell bug that causes the linker scripts to be
60207753Smmgenerated incorrectly.  The symptom of this appears to be "fatal error
61207753Smm- scanner input buffer overflow" error messages.  There are various
62213700Smmworkarounds to this:
63207753Smm  * Build and install bash, and build with "make SHELL=bash".
64207753Smm  * Update to a version of HP/UX with a working shell (e.g., 9.05).
65207753Smm  * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in
66213700Smm    genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the
67213700Smm    emulparams script used exports any shell variables it sets.
68213700Smm