H.J. Lu 40b36307e3 bfd/
2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3831
	* elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
	argument, Elf_Internal_Sym *.

	* elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
	symbol dynamic if info->dynamic_data is TRUE.
	(bfd_elf_record_link_assignment): Updated call to
	bfd_elf_record_link_assignment.
	(_bfd_elf_merge_symbol): Likewise.  Always call
	bfd_elf_link_mark_dynamic_symbol.

include/

2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3831
	* bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list.
	Add dynamic and dynamic_data.

ld/

2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3831
	* NEWS: Mention -Bsymbolic-functions, --dynamic-list-data and
	--dynamic-list-cpp-new.

	* ld.texinfo: Document -Bsymbolic-functions, --dynamic-list-data
	and --dynamic-list-cpp-new.

	* ldlang.c (lang_append_dynamic_list_cpp_new): New.
	(lang_process): Change link_info.dynamic to
	link_info.dynamic_list.
	(lang_append_dynamic_list): Likewise.
	* ldmain.c (main): Likewise.  Initialize link_info.dynamic and
	link_info.dynamic_data to FALSE.

	* ldlang.h (lang_append_dynamic_list_cpp_new): New.

	* lexsup.c (option_values): Add OPTION_DYNAMIC_LIST_DATA and
	OPTION_DYNAMIC_LIST_CPP_NEW.
	(ld_options): Add entries for -Bsymbolic-functions,
	--dynamic-list-data and --dynamic-list-cpp-new.  Make
	-Bsymbolic-functions an alias of --dynamic-list-data.
	(parse_args): Change link_info.dynamic to link_info.dynamic_list.
	Set link_info.dynamic to TRUE for --dynamic-list and
	--dynamic-list-cpp-typeinfo.  Handle --dynamic-list-data and
	--dynamic-list-cpp-new.

ld/testsuite/

2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3831
	* ld-elf/del.cc: New.
	* ld-elf/dl5.cc: Likewise.
	* ld-elf/dl5.out: Likewise.
	* ld-elf/new.cc: Likewise.

	* ld-elf/shared.exp: Add tests for --dynamic-list-data and
	 --dynamic-list-cpp-new.
2007-01-16 14:56:32 +00:00
..
2007-01-11 12:23:53 +00:00
2006-12-11 15:09:46 +00:00
2007-01-16 14:56:32 +00:00
./
2005-05-15 18:19:45 +00:00
2006-05-02 14:20:46 +00:00
2007-01-16 14:56:32 +00:00
2004-01-02 11:16:21 +00:00
2004-04-16 23:56:29 +00:00
2006-01-16 23:15:07 +00:00
2006-01-16 23:15:07 +00:00
2003-10-25 16:26:30 +00:00
2006-12-11 15:09:46 +00:00
2006-12-11 15:09:46 +00:00
ld/
2005-10-30 17:40:28 +00:00
2005-05-12 07:32:09 +00:00
2006-10-30 23:25:51 +00:00
2007-01-16 14:56:32 +00:00
2006-07-19 01:50:23 +00:00
2005-05-12 07:32:09 +00:00
ld/
2007-01-06 22:03:46 +00:00
2005-08-05 13:52:13 +00:00
2005-05-12 07:32:09 +00:00
2005-05-12 07:32:09 +00:00
2006-09-07 17:16:34 +00:00
2006-07-24 13:49:50 +00:00
2007-01-16 14:56:32 +00:00
2007-01-16 14:56:32 +00:00
2006-09-07 17:16:34 +00:00
2006-09-07 17:16:34 +00:00
2007-01-16 14:56:32 +00:00
2005-05-12 07:32:09 +00:00
2005-05-12 07:32:09 +00:00
2005-05-12 07:32:09 +00:00
2005-05-12 07:32:09 +00:00
2005-05-12 07:32:09 +00:00
2007-01-16 14:56:32 +00:00
2000-07-05 19:28:06 +00:00
2006-12-12 14:31:48 +00:00
2006-12-12 14:31:48 +00:00
2005-05-12 07:32:09 +00:00
2005-05-12 07:32:09 +00:00
2007-01-16 14:56:32 +00:00
2007-01-02 07:43:13 +00:00
2007-01-02 07:43:13 +00:00
2002-08-23 08:03:32 +00:00
1999-05-03 07:29:11 +00:00
1999-05-03 07:29:11 +00:00

		README for LD

This is the GNU linker.  It is distributed with other "binary
utilities" which should be in ../binutils.  See ../binutils/README for
more general notes, including where to send bug reports.

There are many features of the linker:

* The linker uses a Binary File Descriptor library (../bfd)
  that it uses to read and write object files.  This helps
  insulate the linker itself from the format of object files.

* The linker supports a number of different object file
  formats.  It can even handle multiple formats at once:
  Read two input formats and write a third.

* The linker can be configured for cross-linking.

* The linker supports a control language.

* There is a user manual (ld.texinfo), as well as the
  beginnings of an internals manual (ldint.texinfo).

Installation
============

See ../binutils/README.

If you want to make a cross-linker, you may want to specify
a different search path of -lfoo libraries than the default.
You can do this by setting the LIB_PATH variable in ./Makefile
or using the --with-lib-path configure switch.

To build just the linker, make the target all-ld from the top level
directory (one directory above this one).

Porting to a new target
=======================

See the ldint.texinfo manual.

Reporting bugs etc
===========================

See ../binutils/README.

Known problems
==============

The Solaris linker normally exports all dynamic symbols from an
executable.  The GNU linker does not do this by default.  This is
because the GNU linker tries to present the same interface for all
similar targets (in this case, all native ELF targets).  This does not
matter for normal programs, but it can make a difference for programs
which try to dlopen an executable, such as PERL or Tcl.  You can make
the GNU linker export all dynamic symbols with the -E or
--export-dynamic command line option.

HP/UX 9.01 has a shell bug that causes the linker scripts to be
generated incorrectly.  The symptom of this appears to be "fatal error
- scanner input buffer overflow" error messages.  There are various
workarounds to this:
  * Build and install bash, and build with "make SHELL=bash".
  * Update to a version of HP/UX with a working shell (e.g., 9.05).
  * Replace "(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc)" in
    genscripts.sh with "sh ${srcdir}..." (no parens) and make sure the
    emulparams script used exports any shell variables it sets.