mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
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.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2008-02-04 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2008-01-31 Marc Gauthier <marc@tensilica.com>
|
2008-01-31 Marc Gauthier <marc@tensilica.com>
|
||||||
|
|
||||||
* config.bfd (xtensa*-*-*): Recognize processor variants.
|
* config.bfd (xtensa*-*-*): Recognize processor variants.
|
||||||
|
@ -351,6 +351,9 @@ bfd_elf_get_elf_syms (bfd *ibfd,
|
|||||||
bfd_size_type amt;
|
bfd_size_type amt;
|
||||||
file_ptr pos;
|
file_ptr pos;
|
||||||
|
|
||||||
|
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
|
||||||
|
abort ();
|
||||||
|
|
||||||
if (symcount == 0)
|
if (symcount == 0)
|
||||||
return intsym_buf;
|
return intsym_buf;
|
||||||
|
|
||||||
@ -363,9 +366,6 @@ bfd_elf_get_elf_syms (bfd *ibfd,
|
|||||||
alloc_ext = NULL;
|
alloc_ext = NULL;
|
||||||
alloc_extshndx = NULL;
|
alloc_extshndx = NULL;
|
||||||
bed = get_elf_backend_data (ibfd);
|
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;
|
extsym_size = bed->s->sizeof_sym;
|
||||||
amt = symcount * extsym_size;
|
amt = symcount * extsym_size;
|
||||||
pos = symtab_hdr->sh_offset + symoffset * extsym_size;
|
pos = symtab_hdr->sh_offset + symoffset * extsym_size;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* 32-bit ELF support for ARM
|
/* 32-bit ELF support for ARM
|
||||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||||
Free Software Foundation, Inc.
|
2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
||||||
|
|
||||||
@ -8524,6 +8524,11 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
|
|||||||
Elf_Internal_Shdr *symtab_hdr;
|
Elf_Internal_Shdr *symtab_hdr;
|
||||||
asection *srel;
|
asection *srel;
|
||||||
|
|
||||||
|
/* FIXME: Here and elsewhere the test for an ELF input BFD is
|
||||||
|
not sufficiently strict. Since we use elf32_arm_tdata and
|
||||||
|
elf32_arm_section_data, we should only allow those targets
|
||||||
|
that in fact have such data. This of course is the set of
|
||||||
|
targets defined in this file. */
|
||||||
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
|
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -8601,6 +8606,9 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
|
|||||||
/* Here we rummage through the found bfds to collect glue information. */
|
/* Here we rummage through the found bfds to collect glue information. */
|
||||||
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
|
for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
|
||||||
{
|
{
|
||||||
|
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
|
||||||
|
continue;
|
||||||
|
|
||||||
/* Initialise mapping tables for code/data. */
|
/* Initialise mapping tables for code/data. */
|
||||||
bfd_elf32_arm_init_maps (ibfd);
|
bfd_elf32_arm_init_maps (ibfd);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user