diff options
author | Ian Lance Taylor <iant@google.com> | 2006-10-10 18:54:06 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-10-10 18:54:06 +0000 |
commit | a783673bd6247d3fcbf2cfe54fe7574d36b97691 (patch) | |
tree | 382ad6bd357c8bd20581d864b0f2c4ada8d303b7 /gold/object.cc | |
parent | 774a49c04797335bacdeb48d2438dc2863c8a9fe (diff) | |
download | ppe42-binutils-a783673bd6247d3fcbf2cfe54fe7574d36b97691.tar.gz ppe42-binutils-a783673bd6247d3fcbf2cfe54fe7574d36b97691.zip |
Avoid multiple definition errors from linkonce sections.
Diffstat (limited to 'gold/object.cc')
-rw-r--r-- | gold/object.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gold/object.cc b/gold/object.cc index d8658e920c..8f1241ad87 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -346,9 +346,9 @@ Sized_object<size, big_endian>::include_linkonce_section( const elfcpp::Shdr<size, big_endian>&) { const char* symname = strrchr(name, '.') + 1; - bool omit1 = layout->add_comdat(symname, false); - bool omit2 = layout->add_comdat(name, true); - return omit1 || omit2; + bool include1 = layout->add_comdat(symname, false); + bool include2 = layout->add_comdat(name, true); + return include1 && include2; } // Lay out the input sections. We walk through the sections and check |