View | Details | Raw Unified | Return to bug 20022 | Differences between
and this patch

Collapse All | Expand All

(-)a/bfd/elflink.c (-7 / +13 lines)
Lines 12294-12302 _bfd_elf_is_start_stop (const struct bfd_link_info *info, Link Here
12294
  asection *s;
12294
  asection *s;
12295
  const char *sec_name;
12295
  const char *sec_name;
12296
12296
12297
  sec_name = NULL;
12298
  if (strncmp (h->root.root.string, "__start_", 8) == 0)
12299
    sec_name = h->root.root.string + 8;
12300
  else if (strncmp (h->root.root.string, "__stop_", 7) == 0)
12301
    sec_name = h->root.root.string + 7;
12302
12297
  if (h->root.type != bfd_link_hash_undefined
12303
  if (h->root.type != bfd_link_hash_undefined
12298
      && h->root.type != bfd_link_hash_undefweak)
12304
      && h->root.type != bfd_link_hash_undefweak)
12299
    return NULL;
12305
    {
12306
      /* PR 20022  */
12307
      if (sec_name && info->gc_sections && h->root.u.undef.section == NULL)
12308
	info->callbacks->einfo (_("%X%P: error: undefined orphan section symbol %s suggests that garbage collection failed\n"),
12309
				h->root.root.string);
12310
      return NULL;
12311
    }
12300
12312
12301
  s = h->root.u.undef.section;
12313
  s = h->root.u.undef.section;
12302
  if (s != NULL)
12314
  if (s != NULL)
Lines 12306-12317 _bfd_elf_is_start_stop (const struct bfd_link_info *info, Link Here
12306
      return s;
12318
      return s;
12307
    }
12319
    }
12308
12320
12309
  sec_name = NULL;
12310
  if (strncmp (h->root.root.string, "__start_", 8) == 0)
12311
    sec_name = h->root.root.string + 8;
12312
  else if (strncmp (h->root.root.string, "__stop_", 7) == 0)
12313
    sec_name = h->root.root.string + 7;
12314
12315
  if (sec_name != NULL && *sec_name != '\0')
12321
  if (sec_name != NULL && *sec_name != '\0')
12316
    {
12322
    {
12317
      bfd *i;
12323
      bfd *i;

Return to bug 20022