summaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-10-18 00:25:53 +0000
committerCary Coutant <ccoutant@google.com>2011-10-18 00:25:53 +0000
commitf7c5b166f66958163526aa5688d8a7e3d0686694 (patch)
tree486d1a59c99520b4b72fb6d2913b3499c438d993 /gold/symtab.h
parent6ffe910a7e62888428dfe53168a5383dd3daf689 (diff)
downloadbinutils-gdb-f7c5b166f66958163526aa5688d8a7e3d0686694.tar.gz
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.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index b9b9e00811e..4707e124837 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).