README 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. README for LD
  2. This is the GNU linker. It is distributed with other "binary
  3. utilities" which should be in ../binutils. See ../binutils/README for
  4. more general notes, including where to send bug reports.
  5. There are many features of the linker:
  6. * The linker uses a Binary File Descriptor library (../bfd)
  7. that it uses to read and write object files. This helps
  8. insulate the linker itself from the format of object files.
  9. * The linker supports a number of different object file
  10. formats. It can even handle multiple formats at once:
  11. Read two input formats and write a third.
  12. * The linker can be configured for cross-linking.
  13. * The linker supports a control language.
  14. * There is a user manual (ld.texi), as well as the
  15. beginnings of an internals manual (ldint.texi).
  16. Installation
  17. ============
  18. See ../binutils/README.
  19. If you want to make a cross-linker, you may want to specify
  20. a different search path of -lfoo libraries than the default.
  21. You can do this by setting the LIB_PATH variable in ./Makefile
  22. or using the --with-lib-path configure switch.
  23. To build just the linker, make the target all-ld from the top level
  24. directory (one directory above this one).
  25. Porting to a new target
  26. =======================
  27. See the ldint.texi manual.
  28. Reporting bugs etc
  29. ===========================
  30. See ../binutils/README.
  31. Known problems
  32. ==============
  33. The Solaris linker normally exports all dynamic symbols from an
  34. executable. The GNU linker does not do this by default. This is
  35. because the GNU linker tries to present the same interface for all
  36. similar targets (in this case, all native ELF targets). This does not
  37. matter for normal programs, but it can make a difference for programs
  38. which try to dlopen an executable, such as PERL or Tcl. You can make
  39. the GNU linker export all dynamic symbols with the -E or
  40. --export-dynamic command line option.
  41. HP/UX 9.01 has a shell bug that causes the linker scripts to be
  42. generated incorrectly. The symptom of this appears to be "fatal error
  43. - scanner input buffer overflow" error messages. There are various
  44. workarounds to this:
  45. * Build and install bash, and build with "make SHELL=bash".
  46. * Update to a version of HP/UX with a working shell (e.g., 9.05).
  47. * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in
  48. genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the
  49. emulparams script used exports any shell variables it sets.
  50. Copyright (C) 2012-2022 Free Software Foundation, Inc.
  51. Copying and distribution of this file, with or without modification,
  52. are permitted in any medium without royalty provided the copyright
  53. notice and this notice are preserved.