+2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
+ (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
+ into the PLT block.
+
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
return FALSE;
}
- dynobj = elf_hash_table (info)->dynobj;
+ if (htab->root.dynobj == NULL)
+ htab->root.dynobj = abfd;
+
+ dynobj = htab->root.dynobj;
+
symtab_hdr = & elf_symtab_hdr (abfd);
sym_hashes = elf_sym_hashes (abfd);
nsyms = NUM_SHDR_ENTRIES (symtab_hdr);
case R_ARM_GOTOFF32:
case R_ARM_GOTPC:
- if (htab->root.sgot == NULL)
- {
- if (htab->root.dynobj == NULL)
- htab->root.dynobj = abfd;
- if (!create_got_section (htab->root.dynobj, info))
- return FALSE;
- }
+ if (htab->root.sgot == NULL
+ && !create_got_section (htab->root.dynobj, info))
+ return FALSE;
break;
case R_ARM_PC24:
dynobj = elf_hash_table (info)->dynobj;
sgot = htab->root.sgotplt;
- BFD_ASSERT (htab->symbian_p || sgot != NULL);
sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)
splt = htab->root.splt;
BFD_ASSERT (splt != NULL && sdyn != NULL);
+ BFD_ASSERT (htab->symbian_p || sgot != NULL);
dyncon = (Elf32_External_Dyn *) sdyn->contents;
dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
+2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Check dynobj
+ instead of dynamic_sections_created.
+
2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com>
* plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
/* We should be able to set the size of the interworking stub section. We
can't do it until later if we have dynamic sections, though. */
- if (! elf_hash_table (&link_info)->dynamic_sections_created)
+ if (elf_hash_table (&link_info)->dynobj == NULL)
{
/* Here we rummage through the found bfds to collect glue information. */
LANG_FOR_EACH_INPUT_STATEMENT (is)