summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-09 10:36:18 +0000
committerNick Clifton <nickc@redhat.com>2011-06-09 10:36:18 +0000
commit7ab1d000c11675aaea3b078e3e2a6cd3f1beaa08 (patch)
tree13508dbb29dc1c905ebf0aa06c9f134dd5479a10 /bfd/elf.c
parent4f4c49ca3aa183f902c654eec3f521d4b1c108f3 (diff)
downloadbinutils-redhat-7ab1d000c11675aaea3b078e3e2a6cd3f1beaa08.tar.gz
PR ld/12845
* elf.c (_bfd_elf_init_private_section_data): Add an assertion that the output section has an allocated bfd_elf_section_data structure. * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for symbols in sections that have been removed by garbage collection. * emultempl/mipself.em (mips_add_stub_section): Do not add stubs for sections that have been removed by garbage collection.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 3d44ef8d28..4664c583b7 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6272,6 +6272,8 @@ _bfd_elf_init_private_section_data (bfd *ibfd,
|| obfd->xvec->flavour != bfd_target_elf_flavour)
return TRUE;
+ BFD_ASSERT (elf_section_data (osec) != NULL);
+
/* For objcopy and relocatable link, don't copy the output ELF
section type from input if the output BFD section flags have been
set to something different. For a final link allow some flags