diff options
author | Cary Coutant <ccoutant@google.com> | 2008-12-10 19:50:14 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2008-12-10 19:50:14 +0000 |
commit | 2756a25828e5a0ccdbaa54dd92b44a69a5f2ee30 (patch) | |
tree | 6d64cbe40bdd120c237ff84e4eed0937965d7d52 /gold/layout.cc | |
parent | a3a219a90a59440cb2a29cee2a4cde87c6bfaf19 (diff) | |
download | gdb-2756a25828e5a0ccdbaa54dd92b44a69a5f2ee30.zip gdb-2756a25828e5a0ccdbaa54dd92b44a69a5f2ee30.tar.gz gdb-2756a25828e5a0ccdbaa54dd92b44a69a5f2ee30.tar.bz2 |
* layout.cc (Layout::add_comdat): Allow COMDAT group from a replacement
object to override a kept COMDAT group from a plugin object.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 2097b6d..a4f17e5 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -47,6 +47,7 @@ #include "reloc.h" #include "descriptors.h" #include "layout.h" +#include "plugin.h" namespace gold { @@ -2959,6 +2960,14 @@ Layout::add_comdat(Relobj* object, unsigned int shndx, if (ins.first->second.group_) { // We've already seen a real section group with this signature. + // If the kept group is from a plugin object, and we're in + // the replacement phase, accept the new one as a replacement. + if (ins.first->second.object_ == NULL + && parameters->options().plugins()->in_replacement_phase()) + { + ins.first->second = kept; + return true; + } return false; } else if (group) |