* elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.

* elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
	(_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
	(_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
	(bfd_elf64_bfd_link_add_symbols): Delete.
	(bfd_elf_link_add_symbols): Declare.
	* elfcode.h (elf_bfd_link_add_symbols): Delete.
	* elflink.c: Include safe-ctype.h.
	(elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
	make static.
	(elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
	(elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
	static.
	(elf_link_add_archive_symbols): Rename from
	_bfd_elf_link_add_archive_symbols, make static.
	(elf_link_add_object_symbols): New function.  Corresponding
	elflink.h function converted to use elf_size_info.
	(bfd_elf_link_add_symbols): Likewise.
	(bfd_elf_size_dynamic_sections): Adjust.
	* elflink.h (elf_bfd_link_add_symbols): Delete.
	(elf_link_add_object_symbols): Delete.
	* elf32-gen.c (elf32_generic_link_add_symbols): Call
	bfd_elf_link_add_symbols.
	* elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
This commit is contained in:
Alan Modra 2004-03-26 05:55:15 +00:00
parent 11c251f45d
commit 4ad4eba5b2
8 changed files with 1371 additions and 1356 deletions

View File

@ -1,3 +1,30 @@
2004-03-26 Alan Modra <amodra@bigpond.net.au>
* elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
* elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
(_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
(_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
(bfd_elf64_bfd_link_add_symbols): Delete.
(bfd_elf_link_add_symbols): Declare.
* elfcode.h (elf_bfd_link_add_symbols): Delete.
* elflink.c: Include safe-ctype.h.
(elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
make static.
(elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
(elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
static.
(elf_link_add_archive_symbols): Rename from
_bfd_elf_link_add_archive_symbols, make static.
(elf_link_add_object_symbols): New function. Corresponding
elflink.h function converted to use elf_size_info.
(bfd_elf_link_add_symbols): Likewise.
(bfd_elf_size_dynamic_sections): Adjust.
* elflink.h (elf_bfd_link_add_symbols): Delete.
(elf_link_add_object_symbols): Delete.
* elf32-gen.c (elf32_generic_link_add_symbols): Call
bfd_elf_link_add_symbols.
* elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
2004-03-25 Alan Modra <amodra@bigpond.net.au>
* elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed

View File

@ -1544,9 +1544,6 @@ extern bfd_boolean _bfd_elf_dynamic_symbol_p
extern bfd_boolean _bfd_elf_symbol_refs_local_p
(struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean);
extern bfd_boolean _bfd_elf_link_add_archive_symbols
(bfd *, struct bfd_link_info *);
extern const bfd_target *bfd_elf32_object_p
(bfd *);
extern const bfd_target *bfd_elf32_core_file_p
@ -1558,8 +1555,6 @@ extern int bfd_elf32_core_file_failing_signal
extern bfd_boolean bfd_elf32_core_file_matches_executable_p
(bfd *, bfd *);
extern bfd_boolean bfd_elf32_bfd_link_add_symbols
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf32_bfd_final_link
(bfd *, struct bfd_link_info *);
@ -1604,8 +1599,6 @@ extern int bfd_elf64_core_file_failing_signal
(bfd *);
extern bfd_boolean bfd_elf64_core_file_matches_executable_p
(bfd *, bfd *);
extern bfd_boolean bfd_elf64_bfd_link_add_symbols
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf64_bfd_final_link
(bfd *, struct bfd_link_info *);
@ -1640,14 +1633,10 @@ extern void bfd_elf64_write_relocs
extern bfd_boolean bfd_elf64_slurp_reloc_table
(bfd *, asection *, asymbol **, bfd_boolean);
extern bfd_boolean bfd_elf_link_add_symbols
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_add_dynamic_entry
(struct bfd_link_info *, bfd_vma, bfd_vma);
extern int _bfd_elf_add_dt_needed_tag
(struct bfd_link_info *, const char *, bfd_boolean);
extern int _bfd_elf_sort_symbol
(const void *, const void *);
extern bfd_boolean _bfd_elf_finalize_dynstr
(bfd *, struct bfd_link_info *);
#define bfd_elf32_link_record_dynamic_symbol \
_bfd_elf_link_record_dynamic_symbol

View File

@ -1,5 +1,5 @@
/* Generic support for 32-bit ELF
Copyright 1993, 1995, 1998, 1999, 2001, 2002
Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -88,7 +88,7 @@ elf32_generic_link_add_symbols (abfd, info)
return FALSE;
}
return bfd_elf32_bfd_link_add_symbols (abfd, info);
return bfd_elf_link_add_symbols (abfd, info);
}
#define TARGET_LITTLE_SYM bfd_elf32_little_generic_vec

View File

@ -1,5 +1,6 @@
/* Generic support for 64-bit ELF
Copyright 1993, 1995, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@ -87,7 +88,7 @@ elf64_generic_link_add_symbols (abfd, info)
return FALSE;
}
return bfd_elf64_bfd_link_add_symbols (abfd, info);
return bfd_elf_link_add_symbols (abfd, info);
}
#define TARGET_LITTLE_SYM bfd_elf64_little_generic_vec

View File

@ -115,7 +115,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_no_info_to_howto NAME(bfd_elf,no_info_to_howto)
#define elf_no_info_to_howto_rel NAME(bfd_elf,no_info_to_howto_rel)
#define elf_find_section NAME(bfd_elf,find_section)
#define elf_bfd_link_add_symbols NAME(bfd_elf,bfd_link_add_symbols)
#define elf_write_shdrs_and_ehdr NAME(bfd_elf,write_shdrs_and_ehdr)
#define elf_write_out_phdrs NAME(bfd_elf,write_out_phdrs)
#define elf_write_relocs NAME(bfd_elf,write_relocs)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -189,6 +189,9 @@
#ifndef bfd_elfNN_bfd_link_hash_table_create
#define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
#endif
#ifndef bfd_elfNN_bfd_link_add_symbols
#define bfd_elfNN_bfd_link_add_symbols bfd_elf_link_add_symbols
#endif
#else /* ! defined (elf_backend_relocate_section) */
/* If no backend relocate_section routine, use the generic linker.
Note - this will prevent the port from being able to use some of