diff options
author | Rafael Ávila de Espíndola <rafael.espindola@gmail.com> | 2014-09-17 17:53:49 -0400 |
---|---|---|
committer | Rafael Ávila de Espíndola <rafael.espindola@gmail.com> | 2014-09-17 17:53:49 -0400 |
commit | 6168c2a1c6636d0897e055d77d807dbd14b34485 (patch) | |
tree | 1be5c58d176e7fa9ea46034aa10373f1495a1b3c /gold/resolve.cc | |
parent | 3a53193762d8c42fd50daa15034c7326af6ce037 (diff) | |
download | gdb-6168c2a1c6636d0897e055d77d807dbd14b34485.zip gdb-6168c2a1c6636d0897e055d77d807dbd14b34485.tar.gz gdb-6168c2a1c6636d0897e055d77d807dbd14b34485.tar.bz2 |
Fix handling of common symbols with plugins.
gold/ChangeLog:
2014-09-17 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
* plugin.cc (Sized_pluginobj::do_add_symbols): Ignore isym->size.
* resolve.cc (Symbol_table::resolve): Don't override common symbols
during the replacement phase.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r-- | gold/resolve.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc index 8cc637a..abb5d90 100644 --- a/gold/resolve.cc +++ b/gold/resolve.cc @@ -303,11 +303,14 @@ Symbol_table::resolve(Sized_symbol<size>* to, // If we're processing replacement files, allow new symbols to override // the placeholders from the plugin objects. + // Treat common symbols specially since it is possible that an ELF + // file increased the size of the alignment. if (to->source() == Symbol::FROM_OBJECT) { Pluginobj* obj = to->object()->pluginobj(); if (obj != NULL - && parameters->options().plugins()->in_replacement_phase()) + && parameters->options().plugins()->in_replacement_phase() + && !to->is_common()) { this->override(to, sym, st_shndx, is_ordinary, object, version); return; |