+2013-10-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_check_relocs): Don't assume
+ a registered dynobj means that a .got has been created.
+
2013-10-17 Alan Modra <amodra@gmail.com>
PR 16056
abfd, sec);
return FALSE;
}
+ }
- /* Create the .got section, so we can assume it's always
- present whenever there's a dynobj. */
+ if (sgot == NULL)
+ {
+ /* We may have a dynobj but no .got section, if machine-
+ independent parts of the linker found a reason to create
+ a dynobj. We want to create the .got section now, so we
+ can assume it's always present whenever there's a dynobj.
+ It's ok to call this function more than once. */
if (!_bfd_elf_create_got_section (dynobj, info))
return FALSE;
- }
- if (sgot == NULL)
- sgot = bfd_get_linker_section (dynobj, ".got");
+ sgot = bfd_get_linker_section (dynobj, ".got");
+ }
if (local_got_refcounts == NULL)
{