summaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-06-10 14:04:23 +0000
committerNick Clifton <nickc@redhat.com>2011-06-10 14:04:23 +0000
commit1f1f769d367925f35765c3b683caff6e592372f3 (patch)
tree508934f3fea0090bdc2d6cbc68781bc9e92a270b /bfd/linker.c
parent4725c921b7bee688081b6d63c3c96a6c1c6037d1 (diff)
downloadbinutils-redhat-1f1f769d367925f35765c3b683caff6e592372f3.tar.gz
* elflink.c (_bfd_elf_link_create_dynamic_sections): If the
backend does not provide a function for creating dynamic sections then fail. (bfd_elf_final_link): Issue a warning message if a dynamic section has the SHT_NOTE type. (bfd_elf_final_link): Do not look for dynamic strings in a section that does not have the SHT_STRTAB type or the name .dynstr. * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got section is not in the output binary. * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise. * ld-elf/elf.exp: Add test for linking a shared library with a broken linker script that marks dynamic sections as being notes. * ld-elf/note-3.s: New test source file. * ld-elf/note-3.t: New test linker script. * ld-elf/note-3.l: Expected output from the linker. * lib/ld-lib.exp (run_ld_link_tests): Improve description.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 90ab63e354..bac541799f 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1566,6 +1566,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
struct bfd_link_hash_entry *h;
bfd_boolean cycle;
+ BFD_ASSERT (section != NULL);
+
if (bfd_is_ind_section (section)
|| (flags & BSF_INDIRECT) != 0)
row = INDR_ROW;