From f7c5b166f66958163526aa5688d8a7e3d0686694 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Tue, 18 Oct 2011 00:25:53 +0000 Subject: PR gold/13245 * plugin.cc (is_visible_from_outside): Check for symbols referenced from dynamic objects. * resolve.cc (Symbol_table::resolve): Don't count references from dynamic objects as references from real ELF files. * testsuite/plugin_test_2.sh: Adjust expected result. --- gold/symtab.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gold/symtab.h') diff --git a/gold/symtab.h b/gold/symtab.h index b9b9e00..4707e12 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -993,7 +993,12 @@ class Symbol // index, not one of the special codes from SHN_LORESERVE to // SHN_HIRESERVE (bit 29). bool is_ordinary_shndx_ : 1; - // True if we've seen this symbol in a real ELF object (bit 30). + // True if we've seen this symbol in a "real" ELF object (bit 30). + // If the symbol has been seen in a relocatable, non-IR, object file, + // it's known to be referenced from outside the IR. A reference from + // a dynamic object doesn't count as a "real" ELF, and we'll simply + // mark the symbol as "visible" from outside the IR. The compiler + // can use this distinction to guide its handling of COMDAT symbols. bool in_real_elf_ : 1; // True if this symbol is defined in a section which was discarded // (bit 31). -- cgit v1.1