README revision 89857
189857Sobrien README for LD 289857Sobrien 338889SjdpThis is the GNU linker. It is distributed with other "binary 438889Sjdputilities" which should be in ../binutils. See ../binutils/README for 538889Sjdpmore general notes, including where to send bug reports. 633965Sjdp 738889SjdpThere are many features of the linker: 833965Sjdp 933965Sjdp* The linker uses a Binary File Descriptor library (../bfd) 1033965Sjdp that it uses to read and write object files. This helps 1133965Sjdp insulate the linker itself from the format of object files. 1233965Sjdp 1338889Sjdp* The linker supports a number of different object file 1433965Sjdp formats. It can even handle multiple formats at once: 1533965Sjdp Read two input formats and write a third. 1633965Sjdp 1733965Sjdp* The linker can be configured for cross-linking. 1833965Sjdp 1938889Sjdp* The linker supports a control language. 2033965Sjdp 2133965Sjdp* There is a user manual (ld.texinfo), as well as the 2233965Sjdp beginnings of an internals manual (ldint.texinfo). 2333965Sjdp 2433965SjdpInstallation 2533965Sjdp============ 2633965Sjdp 2733965SjdpSee ../binutils/README. 2833965Sjdp 2933965SjdpIf you want to make a cross-linker, you may want to specify 3033965Sjdpa different search path of -lfoo libraries than the default. 3133965SjdpYou can do this by setting the LIB_PATH variable in ./Makefile. 3233965Sjdp 3338889SjdpTo build just the linker, make the target all-ld from the top level 3438889Sjdpdirectory (one directory above this one). 3533965Sjdp 3633965SjdpPorting to a new target 3733965Sjdp======================= 3833965Sjdp 3933965SjdpSee the ldint.texinfo manual. 4033965Sjdp 4133965SjdpReporting bugs etc 4233965Sjdp=========================== 4338889Sjdp 4433965SjdpSee ../binutils/README. 4533965Sjdp 4633965SjdpKnown problems 4733965Sjdp============== 4833965Sjdp 4938889SjdpThe Solaris linker normally exports all dynamic symbols from an 5038889Sjdpexecutable. The GNU linker does not do this by default. This is 5138889Sjdpbecause the GNU linker tries to present the same interface for all 5238889Sjdpsimilar targets (in this case, all native ELF targets). This does not 5338889Sjdpmatter for normal programs, but it can make a difference for programs 5438889Sjdpwhich try to dlopen an executable, such as PERL or Tcl. You can make 5538889Sjdpthe GNU linker export all dynamic symbols with the -E or 5638889Sjdp--export-dynamic command line option. 5738889Sjdp 5833965SjdpHP/UX 9.01 has a shell bug that causes the linker scripts to be 5933965Sjdpgenerated incorrectly. The symptom of this appears to be "fatal error 6033965Sjdp- scanner input buffer overflow" error messages. There are various 6133965Sjdpworkarounds to this: 6233965Sjdp * Build and install bash, and build with "make SHELL=bash". 6333965Sjdp * Update to a version of HP/UX with a working shell (e.g., 9.05). 6433965Sjdp * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in 6533965Sjdp genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the 6633965Sjdp emulparams script used exports any shell variables it sets. 67