H.J. Lu 3084d7a27b ELF: Add _bfd_elf_add_dynamic_tags
All ELF backends with shared library support need to add dynamic tags.
Add dt_pltgot_required and dt_jmprel_required to elf_link_hash_table to
indicate that DT_PLTGOT and DT_JMPREL are required dynamic tags.

1. Add _bfd_elf_add_dynamic_tags to add common dynamic tags.
2. Add _bfd_elf_maybe_vxworks_add_dynamic_tags to add common VxWorks
dynamic tags.

	* elf-bfd.h (elf_link_hash_table): Add dt_pltgot_required and
	dt_jmprel_required.
	(_bfd_elf_add_dynamic_tags): New.
	* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Call
	_bfd_elf_add_dynamic_tags.
	* elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
	* elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
	* elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
	* elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
	* elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
	* elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
	* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
	* elf32-microblaze.c (microblaze_elf_size_dynamic_sections):
	Likewise.
	* elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
	* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
	* elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
	* elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
	* elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
	* elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
	* elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections):
	Likewise.
	* elfnn-riscv.c (riscv_elf_size_dynamic_sections): Likewise.
	* elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
	* elf32-arm.c (elf32_arm_size_dynamic_sections): Call
	_bfd_elf_maybe_vxworks_add_dynamic_tags.
	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections):
	Likewise.
	* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
	(_bfd_x86_elf_size_dynamic_sections): Likewise.
	* elfxx-x86.h (elf_x86_link_hash_table): Remove dt_reloc,
	dt_reloc_sz and dt_reloc_ent.
	* elf-vxworks.c (_bfd_elf_maybe_vxworks_add_dynamic_tags): New.
	* elf-vxworks.h (_bfd_elf_maybe_vxworks_add_dynamic_tags):
	Likewise.
	* elf32-hppa.c (elf32_hppa_link_hash_table_create): Set
	etab.dt_pltgot_required.
	(elf32_hppa_size_dynamic_sections): Call
	_bfd_elf_add_dynamic_tags.
	* elf32-metag.c (elf_metag_link_hash_table_create): Set
	etab.dt_pltgot_required.
	(elf_metag_size_dynamic_sections): Call _bfd_elf_add_dynamic_tags.
	* elf32-sh.c (sh_elf_link_hash_table_create): Set
	root.dt_pltgot_required for FDPIC output.
	(sh_elf_size_dynamic_sections): Call
	_bfd_elf_maybe_vxworks_add_dynamic_tags.
	* elf32-xtensa.c (elf_xtensa_link_hash_table_create): Set
	elf.dt_pltgot_required.
	(elf_xtensa_size_dynamic_sections): Call
	_bfd_elf_add_dynamic_tags.
	* elf64-hppa.c (elf64_hppa_hash_table_create): Set
	root.dt_pltgot_required.
	(elf64_hppa_size_dynamic_sections): Call
	_bfd_elf_add_dynamic_tags.
	* elfnn-ia64.c (elfNN_ia64_hash_table_create): Set
	root.dt_pltgot_required.
	(elfNN_ia64_size_dynamic_sections): Set root.dt_jmprel_required
	for rel_pltoff_sec.  Call _bfd_elf_add_dynamic_tags.
	* elflink.c (_bfd_elf_add_dynamic_tags): New.
2020-06-23 05:07:45 -07:00
..
2020-06-16 15:57:59 +09:30
2020-03-02 23:49:03 +10:30
2020-06-04 12:34:17 -07:00
2020-02-19 13:12:00 +10:30
2020-05-23 16:56:38 +09:30
2020-03-02 19:30:48 +10:30
2020-05-19 12:35:03 +09:30
2020-06-23 05:07:45 -07:00
2020-03-03 00:12:44 +10:30
2020-02-26 10:37:25 +10:30
2020-03-02 19:30:48 +10:30
2020-03-02 11:36:19 +10:30
2020-06-16 15:57:59 +09:30
2020-03-20 03:55:30 -07:00
2020-02-19 17:46:10 +00:00
2020-02-19 13:12:00 +10:30
2020-06-23 05:07:45 -07:00
2020-06-23 05:07:45 -07:00
2020-02-19 13:12:00 +10:30
2020-06-23 05:07:45 -07:00
2020-02-19 13:12:00 +10:30
2020-06-23 05:07:45 -07:00
2020-06-23 05:07:45 -07:00
2020-06-23 05:07:45 -07:00
2020-02-19 13:14:05 +10:30
2020-06-23 05:07:45 -07:00
2020-02-19 13:12:00 +10:30
2020-02-26 10:37:25 +10:30
2020-06-03 17:59:44 +09:30
2020-05-19 12:35:03 +09:30
2020-06-23 05:07:45 -07:00
2020-06-23 05:07:45 -07:00
2020-06-23 05:07:45 -07:00
2020-02-19 13:12:00 +10:30
2020-03-02 23:49:03 +10:30
2020-03-03 00:12:44 +10:30
2020-02-26 10:37:25 +10:30
2020-03-26 20:02:42 +10:30
2020-03-02 23:49:03 +10:30
2020-03-02 23:49:03 +10:30
2020-03-02 19:30:48 +10:30
2020-03-02 19:30:48 +10:30
2020-03-02 19:30:48 +10:30
2020-03-02 19:30:48 +10:30
2020-03-02 19:30:48 +10:30
2020-06-16 15:57:59 +09:30
2020-06-16 15:57:59 +09:30
2020-03-02 23:49:03 +10:30
2020-05-21 23:39:36 +09:30
2020-03-02 23:49:03 +10:30
2020-04-27 17:41:39 +01:00
2020-03-20 03:55:30 -07:00
2020-03-02 19:30:48 +10:30
2020-03-02 23:49:03 +10:30
2020-03-03 00:12:44 +10:30
2020-04-18 10:24:17 +09:30
2020-06-16 15:57:59 +09:30
2020-03-31 15:04:21 +10:30
2020-06-23 00:00:06 +00:00
2020-06-01 23:33:28 +09:30
2020-03-09 10:10:36 +10:30
2020-03-02 19:30:48 +10:30
2020-03-02 19:30:48 +10:30

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

BFD is an object file library.  It permits applications to use the
same routines to process object files regardless of their format.

BFD is used by the GNU debugger, assembler, linker, and the binary
utilities.

The documentation on using BFD is scanty and may be occasionally
incorrect.  Pointers to documentation problems, or an entirely
rewritten manual, would be appreciated.

There is some BFD internals documentation in doc/bfdint.texi which may
help programmers who want to modify BFD.

BFD is normally built as part of another package.  See the build
instructions for that package, probably in a README file in the
appropriate directory.

BFD supports the following configure options:

  --target=TARGET
	The default target for which to build the library.  TARGET is
	a configuration target triplet, such as sparc-sun-solaris.
  --enable-targets=TARGET,TARGET,TARGET...
	Additional targets the library should support.  To include
	support for all known targets, use --enable-targets=all.
  --enable-64-bit-bfd
	Include support for 64 bit targets.  This is automatically
	turned on if you explicitly request a 64 bit target, but not
	for --enable-targets=all.  This requires a compiler with a 64
	bit integer type, such as gcc.
  --enable-shared
	Build BFD as a shared library.
  --with-mmap
	Use mmap when accessing files.  This is faster on some hosts,
	but slower on others.  It may not work on all hosts.

Report bugs with BFD to bug-binutils@gnu.org.

Patches are encouraged.  When sending patches, always send the output
of diff -u or diff -c from the original file to the new file.  Do not
send default diff output.  Do not make the diff from the new file to
the original file.  Remember that any patch must not break other
systems.  Remember that BFD must support cross compilation from any
host to any target, so patches which use ``#ifdef HOST'' are not
acceptable.  Please also read the ``Reporting Bugs'' section of the
gcc manual.

Bug reports without patches will be remembered, but they may never get
fixed until somebody volunteers to fix them.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.