const char *n2;
int prio1;
int prio2;
- int ret;
n1 = (*pe1)->name;
if (n1 == NULL)
/* If this is not a relocateable link, all we need is the
size, which we can get from the input BFD. */
- howto = bfd_reloc_type_lookup (p->elements->section->owner,
- p->reloc);
+ if (p->elements->section->owner != NULL)
+ howto = bfd_reloc_type_lookup (p->elements->section->owner,
+ p->reloc);
if (howto == NULL)
{
einfo (_("%P%X: %s does not support reloc %s for set %s\n"),
minfo ("%G\n", e->section->owner, e->section, e->value);
}
+ /* Need SEC_KEEP for --gc-sections */
+ if (! bfd_is_abs_section (e->section))
+ e->section->flags |= SEC_KEEP;
+
if (link_info.relocateable)
lang_add_reloc (p->reloc, howto, e->section, e->name,
exp_intop (e->value));