binutils-gdb modified for the FreeChainXenon project
Find a file
Ian Lance Taylor 12662be4fe Fix the ELF linker to not require an interpreter if no dynamic
objects were seen, even when linking PIC code.
	* libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
	(struct elf_link_hash_table): Add field dynamic_sections_created.
	* elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
	doesn't already exist.
	(elf_link_add_object_symbols): Create dynamic sections based on
	dynamic_sections_created field, not dynobj field.  Don't bother to
	set dynobj.
	(elf_link_create_dynamic_sections): If dynamic sections were
	already created, don't do anything.  If dynobj is already set, use
	it; otherwise, set it to the bfd argument.  Don't initialize
	dynsymcount.  Only create dynstr if it does not exist.  Set
	dynamic_sections_created to true.
	(NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
	if no dynamic objects were seen.
	(elf_adjust_dynamic_symbol): If a symbol has the
	ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
	(elf_bfd_final_link): Change most decisions based on dynobj to
	check dynamic_sections_created instead.
	(elf_link_output_extsym): Only handle dynamic symbols if a dynamic
	object was seen.
	* elf.c (_bfd_elf_link_hash_table_init): Initialize new field
	dynamic_sections_created.  Set dynsymcount to 1, not 0.
	* elf32-i386.c (elf_i386_create_dynamic_sections): Call
	elf_i386_create_got_section rather than creating the .got and
	.got.plt sections.
	(elf_i386_create_got_section): New static function.
	(elf_i386_check_relocs): Just call elf_i386_create_got_section if
	a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
	Only create the .rel.got section, and only make space for a reloc,
	for a global symbol or when generating a shared object.  For a
	R_386_PLT32 reloc, just set the	ELF_LINK_HASH_NEEDS_PLT flag.
	(elf_i386_adjust_dynamic_symbol): Rework initial assertion to
	permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols.  Create a
	procedure linkage table entry for such symbols.  But, if no
	dynamic objects were seen, never create a PLT entry.
	(elf_i386_size_dynamic_sections): If no dynamic objects were seen,
	skip most of this function, and force the size of the .rel.got
	section to zero.
	(elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
	symbol when no dynamic object was seen, initialize the contents of
	the .got section.  For a R_386_GOT32 against a local symbol, only
	create a R_386_RELATIVE reloc when generating a shared object.
	Treat a R_386_PLT32 reloc against a symbol for which we did not
	create a PLT entry as a R_386_PC32 reloc.
	(elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
	entries and the PLT if we saw a dynamic object.
	* elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
	setting rightshift to 10.  Fix R_SPARC_WPLT20 by setting
	rightshift to 2, size to 2, bitsize to 30, and dst_mask to
	0x3fffffff.
	(elf32_sparc_create_dynamic_sections): Don't set the size of the
	.plt section.  Call elf32_sparc_create_got_section rather than
	creating the .got section.
	(elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
	a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
	Only create the .rela.got section, and only make space for a
	reloc, for a global symbol or when generating a shared object.
	Set the alignment of the .rela.got section to 2.  For a
	R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
	(elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
	permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols.  Create a
	procedure linkage table for such symbols.  But, if no dynamic
	objects were seen, never create a PLT entry.  Initialize the size
	of the .plt section.
	(elf32_sparc_size_dynamic_sections): If no dynamic objects were
	seen, skip most of this function, and force the size of the
	.rela.got section to zero.  Strip empty reloc sections, and strip
	an empty .plt section.
	(elf32_sparc_relocate_section): For a GOT reloc against a global
	symbol when no dynamic object was seen, initialize the contents of
	the .got section.  For a GOT reloc against a local symbol, only
	create a R_SPARC_RELATIVE reloc when generating a shared object.
	Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
	create a PLT entry as a R_SPARC_WDISP30 reloc.
	(elf32_sparc_finish_dynamic_sections): Only fiddle with the
	dynamic entries and the PLT if we saw a dynamic object.
1994-10-21 22:00:18 +00:00
bfd Fix the ELF linker to not require an interpreter if no dynamic 1994-10-21 22:00:18 +00:00
binutils * objcopy.c (gap_fill_set, gap_fill): New static variables. 1994-10-20 17:58:23 +00:00
config * mh-cxux: New file, from Bob Rusk (rrusk@mail.csd.harris.com). 1994-07-16 19:24:33 +00:00
gas * gas/hppa/reloc/blebug3.s: New test. 1994-10-20 06:56:55 +00:00
gdb * configure.in (*-*-netware): Use config/mt-netware. 1994-10-21 18:34:40 +00:00
gprof cfree -> free 1994-09-23 19:12:14 +00:00
include * a29k.h: Add operand type 'I' for inv' and iretinv'. On 1994-10-19 17:36:38 +00:00
ld * configure.in: Add * at the end of m68k-hp-hpux. 1994-10-21 02:02:54 +00:00
mmalloc * COPYING.LIB: New file (standard version 2 LGPL, as already cited 1993-11-17 04:35:46 +00:00
opcodes * a29k-dis.c (print_special): Add special register names defined 1994-10-19 17:41:18 +00:00
readline * configure.in: Change i[34]86 to i[345]86. 1994-08-24 17:05:33 +00:00
sim Specify the file type. 1994-06-28 01:05:38 +00:00
.Sanitize Sigh. I nuked more than one set of dje's changes. 1994-10-12 20:15:17 +00:00
Build-A-Release.mk didn't get propagated from progressive to devo. 1992-07-31 17:33:55 +00:00
build-all.mk Added irix5 info 1994-10-20 19:25:23 +00:00
ChangeLog * config.guess: Merge with FSF. 1994-10-21 01:55:14 +00:00
ChangeLog.mpw * mpw-build.in (all): Display start and end times. 1994-09-24 21:23:04 +00:00
config.guess * config.guess: Fix i486-ncr-sysv43 -> i486-ncr-sysv4.3. 1994-08-27 22:08:32 +00:00
config.sub * config.sub: No longer recognize h8300h. 1994-10-03 21:30:15 +00:00
configure configure: Accept and ignore --cache*, for compat w/autoconf 2. 1994-08-26 20:46:31 +00:00
configure.in * configure.in (target_libs): Remove libstdc++ for libg++-2.6.1. 1994-10-21 02:27:38 +00:00
DOC.Sanitize Remove mention of keep-powerpc-netware: PowerPC NetWare is no longer 1994-05-20 18:26:18 +00:00
INSTALL Nearly complete. Still needs pointer to "more doc". 1991-04-13 07:41:11 +00:00
install-texi.in Add some files from Progressive shich shouldn't be lost. 1992-07-29 16:21:34 +00:00
Install.in Add some files from Progressive shich shouldn't be lost. 1992-07-29 16:21:34 +00:00
install.sh * install.sh: If $dstdir exists, don't check whether each component does. 1994-04-27 19:19:56 +00:00
intro.texi Add some files from Progressive shich shouldn't be lost. 1992-07-29 16:21:34 +00:00
Makefile.in * Makefile.in (all-binutils): Depend upon all-byacc. 1994-10-18 19:34:31 +00:00
mpw-build.in Sun Feb 27 16:05:15 1994 Stan Shebs (shebs@andros.cygnus.com) 1994-02-28 00:15:29 +00:00
mpw-config.in Sun Feb 27 16:05:15 1994 Stan Shebs (shebs@andros.cygnus.com) 1994-02-28 00:15:29 +00:00
mpw-configure Thu Mar 17 12:55:51 1994 Stan Shebs (shebs@andros.cygnus.com) 1994-03-17 23:02:58 +00:00
mpw-README Sun Feb 27 16:05:15 1994 Stan Shebs (shebs@andros.cygnus.com) 1994-02-28 00:15:29 +00:00
Pack-A-Progressive Add some files from Progressive shich shouldn't be lost. 1992-07-29 16:21:34 +00:00
SUPPORTED Initial revision 1991-06-12 21:44:36 +00:00
tape-labels-tex.in Add some files from Progressive shich shouldn't be lost. 1992-07-29 16:21:34 +00:00
test-build.mk Added --with-stabs for alpha and sgi5.2 1994-10-20 17:49:11 +00:00