aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-02-04 00:09:04 +0000
committerAlan Modra <amodra@gmail.com>2008-02-04 00:09:04 +0000
commite44a2c9c3dd1e12fd2707c6407d3763fa8acae17 (patch)
treefc6ed5ac0f925500880dc82814b8cc27a316df3c /bfd/elf.c
parentce43ce4475d418368fcb46eca3d9457cb18e461c (diff)
downloadgdb-e44a2c9c3dd1e12fd2707c6407d3763fa8acae17.zip
gdb-e44a2c9c3dd1e12fd2707c6407d3763fa8acae17.tar.gz
gdb-e44a2c9c3dd1e12fd2707c6407d3763fa8acae17.tar.bz2
PR ld/5692
* elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort on non-ELF input. * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue processing on non-ELF input.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index b8b7c92..b5dd636 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -351,6 +351,9 @@ bfd_elf_get_elf_syms (bfd *ibfd,
bfd_size_type amt;
file_ptr pos;
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ abort ();
+
if (symcount == 0)
return intsym_buf;
@@ -363,9 +366,6 @@ bfd_elf_get_elf_syms (bfd *ibfd,
alloc_ext = NULL;
alloc_extshndx = NULL;
bed = get_elf_backend_data (ibfd);
- /* PR ld/5692: Check for non-ELF files. */
- if (bed == NULL)
- return NULL;
extsym_size = bed->s->sizeof_sym;
amt = symcount * extsym_size;
pos = symtab_hdr->sh_offset + symoffset * extsym_size;