aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-08-24 16:36:04 +0000
committerNick Clifton <nickc@redhat.com>2001-08-24 16:36:04 +0000
commit8ea2e4bd701102e0d30274c3c37f1ff60ccb3f1d (patch)
treec90e9fae26746838533c88cacda0460632ea0959 /bfd/elf.c
parent1ae8b3d2a04d1064a403ce6adf997831e1a55300 (diff)
downloadgdb-8ea2e4bd701102e0d30274c3c37f1ff60ccb3f1d.zip
gdb-8ea2e4bd701102e0d30274c3c37f1ff60ccb3f1d.tar.gz
gdb-8ea2e4bd701102e0d30274c3c37f1ff60ccb3f1d.tar.bz2
Apply H.J.'s patch to revert change to elfxx-target.h
Apply my patch to allow SREC as output format.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index d1aab9e..6077811 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -571,8 +571,15 @@ _bfd_elf_merge_sections (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
- if (elf_hash_table (info)->merge_info)
- _bfd_merge_sections (abfd, elf_hash_table (info)->merge_info);
+ struct elf_link_hash_table * hash_table;
+
+ hash_table = elf_hash_table (info);
+
+ if (hash_table == NULL)
+ return false;
+
+ if (hash_table->merge_info)
+ _bfd_merge_sections (abfd, hash_table->merge_info);
return true;
}
@@ -1047,6 +1054,8 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
struct bfd_hash_table *,
const char *));
{
+ boolean ret;
+
table->dynamic_sections_created = false;
table->dynobj = NULL;
/* The first dynamic symbol is a dummy. */
@@ -1059,7 +1068,10 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->stab_info = NULL;
table->merge_info = NULL;
table->dynlocal = NULL;
- return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
+ ret = _bfd_link_hash_table_init (& table->root, abfd, newfunc);
+ table->root.type = bfd_link_elf_hash_table;
+
+ return ret;
}
/* Create an ELF linker hash table. */