aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-04-12 07:35:07 +0000
committerNick Clifton <nickc@redhat.com>2012-04-12 07:35:07 +0000
commit202e23565d36f4696d5e836ec06d4c685c30fb16 (patch)
treea6fc6863b9383d5611012636e9fc80c58c2330e6 /bfd/elflink.c
parent81eb0a20fcefcddb5863de3b53ffdc93df2881be (diff)
downloadgdb-202e23565d36f4696d5e836ec06d4c685c30fb16.zip
gdb-202e23565d36f4696d5e836ec06d4c685c30fb16.tar.gz
gdb-202e23565d36f4696d5e836ec06d4c685c30fb16.tar.bz2
* configure.ac (ia64*-*-*vms*): Add support for ld.
* configure: Regenerate. * scripttempl/ia64vms.sc: New file. * emultempl/vms.em (_before_parse): Support for ia64. (elf64-ia64-vms): New fragment for ia64. * emulparams/elf64_ia64_vms.sh: New file. * configure.tgt (ia64-*-*vms*): Add. * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c (eelf64_ia64_vms.c): New rule. * Makefile.in: Regenerate. * elflink.c (elf_link_output_extsym): Add a guard. (bfd_elf_final_link): Remove assertion. (bfd_elf_final_link): Add a guard. * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed. (elfNN_vms_section_from_shdr, elfNN_vms_object_p) (elfNN_vms_post_process_headers, elfNN_vms_section_processing) (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup): Remove. (elfNN-ia64-vms target): Move to ... * elf64-ia64-vms.c: New file. * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo. (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c. * configure: Regenerate. * Makefile.in: Regenerate.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 12025a3..0ed5208 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8908,7 +8908,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
/* If this symbol should be put in the .dynsym section, then put it
there now. We already know the symbol index. We also fill in
the entry in the .hash section. */
- if (h->dynindx != -1
+ if (finfo->dynsym_sec != NULL
+ && h->dynindx != -1
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
bfd_byte *esym;
@@ -10305,7 +10306,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
finfo.dynsym_sec = bfd_get_section_by_name (dynobj, ".dynsym");
finfo.hash_sec = bfd_get_section_by_name (dynobj, ".hash");
- BFD_ASSERT (finfo.dynsym_sec != NULL);
+ /* Note that dynsym_sec can be NULL (on VMS). */
finfo.symver_sec = bfd_get_section_by_name (dynobj, ".gnu.version");
/* Note that it is OK if symver_sec is NULL. */
}
@@ -10825,6 +10826,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
symtab_hdr->sh_info = bfd_get_symcount (abfd);
if (dynamic
+ && finfo.dynsym_sec != NULL
&& finfo.dynsym_sec->output_section != bfd_abs_section_ptr)
{
Elf_Internal_Sym sym;