aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-10-10 18:54:06 +0000
committerIan Lance Taylor <iant@google.com>2006-10-10 18:54:06 +0000
commita783673bd6247d3fcbf2cfe54fe7574d36b97691 (patch)
tree382ad6bd357c8bd20581d864b0f2c4ada8d303b7 /gold/object.cc
parent774a49c04797335bacdeb48d2438dc2863c8a9fe (diff)
downloadgdb-a783673bd6247d3fcbf2cfe54fe7574d36b97691.zip
gdb-a783673bd6247d3fcbf2cfe54fe7574d36b97691.tar.gz
gdb-a783673bd6247d3fcbf2cfe54fe7574d36b97691.tar.bz2
Avoid multiple definition errors from linkonce sections.
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gold/object.cc b/gold/object.cc
index d8658e9..8f1241a 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