README revision 130561
1249259Sdim		README for LD
2249259Sdim
3353358SdimThis is the GNU linker.  It is distributed with other "binary
4353358Sdimutilities" which should be in ../binutils.  See ../binutils/README for
5353358Sdimmore general notes, including where to send bug reports.
6249259Sdim
7249259SdimThere are many features of the linker:
8249259Sdim
9249259Sdim* The linker uses a Binary File Descriptor library (../bfd)
10249259Sdim  that it uses to read and write object files.  This helps
11249259Sdim  insulate the linker itself from the format of object files.
12249259Sdim
13327952Sdim* The linker supports a number of different object file
14249259Sdim  formats.  It can even handle multiple formats at once:
15276479Sdim  Read two input formats and write a third.
16249259Sdim
17249259Sdim* The linker can be configured for cross-linking.
18360784Sdim
19249259Sdim* The linker supports a control language.
20249259Sdim
21276479Sdim* There is a user manual (ld.texinfo), as well as the
22327952Sdim  beginnings of an internals manual (ldint.texinfo).
23327952Sdim
24327952SdimInstallation
25288943Sdim============
26261991Sdim
27360784SdimSee ../binutils/README.
28249259Sdim
29249259SdimIf you want to make a cross-linker, you may want to specify
30249259Sdima different search path of -lfoo libraries than the default.
31249259SdimYou can do this by setting the LIB_PATH variable in ./Makefile
32249259Sdimor using the --with-lib-path configure switch.
33249259Sdim
34249259SdimTo build just the linker, make the target all-ld from the top level
35309124Sdimdirectory (one directory above this one).
36249259Sdim
37249259SdimPorting to a new target
38249259Sdim=======================
39249259Sdim
40249259SdimSee the ldint.texinfo manual.
41249259Sdim
42249259SdimReporting bugs etc
43249259Sdim===========================
44249259Sdim
45249259SdimSee ../binutils/README.
46249259Sdim
47249259SdimKnown problems
48249259Sdim==============
49249259Sdim
50276479SdimThe Solaris linker normally exports all dynamic symbols from an
51249259Sdimexecutable.  The GNU linker does not do this by default.  This is
52249259Sdimbecause the GNU linker tries to present the same interface for all
53249259Sdimsimilar targets (in this case, all native ELF targets).  This does not
54249259Sdimmatter for normal programs, but it can make a difference for programs
55249259Sdimwhich try to dlopen an executable, such as PERL or Tcl.  You can make
56249259Sdimthe GNU linker export all dynamic symbols with the -E or
57249259Sdim--export-dynamic command line option.
58276479Sdim
59249259SdimHP/UX 9.01 has a shell bug that causes the linker scripts to be
60249259Sdimgenerated incorrectly.  The symptom of this appears to be "fatal error
61249259Sdim- scanner input buffer overflow" error messages.  There are various
62249259Sdimworkarounds to this:
63249259Sdim  * Build and install bash, and build with "make SHELL=bash".
64249259Sdim  * Update to a version of HP/UX with a working shell (e.g., 9.05).
65249259Sdim  * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in
66249259Sdim    genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the
67249259Sdim    emulparams script used exports any shell variables it sets.
68249259Sdim