From d3a65d4deaf2c553480a43796e0d987adc5f9f43 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Sun, 21 Oct 2012 03:23:37 +0000 Subject: [PATCH] * linker.c (_bfd_generic_link_output_symbols): Handle a no-longer-global symbol entered as a BFD_PLUGIN. --- bfd/ChangeLog | 5 +++++ bfd/linker.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 95d6c693ba0..c537b92cbfe 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-10-21 Hans-Peter Nilsson + + * linker.c (_bfd_generic_link_output_symbols): Handle a + no-longer-global symbol entered as a BFD_PLUGIN. + 2012-10-20 Alan Modra * compress.c: Reinstate 2012-10-19 change. diff --git a/bfd/linker.c b/bfd/linker.c index 3caec96a8f0..d3ef9a43a5b 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -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 (); -- 2.30.2