Relax assertion in BFIN linker to allow for discard GOT relocs.
[binutils-gdb.git] / bfd / linker.c
index 86a7a1945ba7527b4280045c51472d1a9dc44435..97b5d18d84534ddcb774ea5c3289077ab896713f 100644 (file)
@@ -1,5 +1,5 @@
 /* linker.c -- BFD linker routines
-   Copyright (C) 1993-2015 Free Software Foundation, Inc.
+   Copyright (C) 1993-2016 Free Software Foundation, Inc.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1475,7 +1475,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
   else if (bfd_is_com_section (section))
     {
       row = COMMON_ROW;
-      if (strcmp (name, "__gnu_lto_slim") == 0)
+      if (!bfd_link_relocatable (info)
+         && strcmp (name, "__gnu_lto_slim") == 0)
        (*_bfd_error_handler)
          (_("%s: plugin needed to handle lto object"),
           bfd_get_filename (abfd));