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. 31130561SobrienYou can do this by setting the LIB_PATH variable in ./Makefile 32130561Sobrienor using the --with-lib-path configure switch. 3333965Sjdp 3438889SjdpTo build just the linker, make the target all-ld from the top level 3538889Sjdpdirectory (one directory above this one). 3633965Sjdp 3733965SjdpPorting to a new target 3833965Sjdp======================= 3933965Sjdp 4033965SjdpSee the ldint.texinfo manual. 4133965Sjdp 4233965SjdpReporting bugs etc 4333965Sjdp=========================== 4438889Sjdp 4533965SjdpSee ../binutils/README. 4633965Sjdp 4733965SjdpKnown problems 4833965Sjdp============== 4933965Sjdp 5038889SjdpThe Solaris linker normally exports all dynamic symbols from an 5138889Sjdpexecutable. The GNU linker does not do this by default. This is 5238889Sjdpbecause the GNU linker tries to present the same interface for all 5338889Sjdpsimilar targets (in this case, all native ELF targets). This does not 5438889Sjdpmatter for normal programs, but it can make a difference for programs 5538889Sjdpwhich try to dlopen an executable, such as PERL or Tcl. You can make 5638889Sjdpthe GNU linker export all dynamic symbols with the -E or 5738889Sjdp--export-dynamic command line option. 5838889Sjdp 5933965SjdpHP/UX 9.01 has a shell bug that causes the linker scripts to be 6033965Sjdpgenerated incorrectly. The symptom of this appears to be "fatal error 6133965Sjdp- scanner input buffer overflow" error messages. There are various 6233965Sjdpworkarounds to this: 6333965Sjdp * Build and install bash, and build with "make SHELL=bash". 6433965Sjdp * Update to a version of HP/UX with a working shell (e.g., 9.05). 6533965Sjdp * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in 6633965Sjdp genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the 6733965Sjdp emulparams script used exports any shell variables it sets. 68