* linker.c (_bfd_generic_link_output_symbols): Handle a
authorHans-Peter Nilsson <hp@axis.com>
Sun, 21 Oct 2012 03:23:37 +0000 (03:23 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Sun, 21 Oct 2012 03:23:37 +0000 (03:23 +0000)
no-longer-global symbol entered as a BFD_PLUGIN.

bfd/ChangeLog
bfd/linker.c

index 95d6c693ba00f081c832d7ad6ec8deee782006aa..c537b92cbfe27346b1ec17c786fd18b00044c232 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-21  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * linker.c (_bfd_generic_link_output_symbols): Handle a
+       no-longer-global symbol entered as a BFD_PLUGIN.
+
 2012-10-20  Alan Modra  <amodra@gmail.com>
 
        * compress.c: Reinstate 2012-10-19 change.
index 3caec96a8f038ac64e0df3e794484023c4370327..d3ef9a43a5bca8096221870248daf58007c6ef78 100644 (file)
@@ -2359,6 +2359,12 @@ _bfd_generic_link_output_symbols (bfd *output_bfd,
          else
            output = FALSE;
        }
+      else if (sym->flags == 0
+              && (sym->section->owner->flags & BFD_PLUGIN) != 0)
+       /* LTO doesn't set symbol information.  We get here with the
+          generic linker for a symbol that was "common" but no longer
+          needs to be global.  */
+       output = FALSE;
       else
        abort ();