aboutsummaryrefslogtreecommitdiff
path: root/gold/plugin.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-03-01 22:22:02 +0000
committerIan Lance Taylor <ian@airs.com>2009-03-01 22:22:02 +0000
commit8a4c0b0d7ee3f258acf37d6d1e5e34ae54f86391 (patch)
treea56d1ab9b0fe09abde5b5526bf5d3d2d3f460b9f /gold/plugin.cc
parentd1bbb13a635b6bdc15dd0e597a8424a5a2d65610 (diff)
downloadfsf-binutils-gdb-8a4c0b0d7ee3f258acf37d6d1e5e34ae54f86391.zip
fsf-binutils-gdb-8a4c0b0d7ee3f258acf37d6d1e5e34ae54f86391.tar.gz
fsf-binutils-gdb-8a4c0b0d7ee3f258acf37d6d1e5e34ae54f86391.tar.bz2
* layout.cc (Layout::find_or_add_kept_section): New function.
(Layout::add_comdat): Removed. * layout.h (struct Kept_section): Move out of class Layout. Remove trailing underscores from field names. Add group_sections field. Rename group_ field to is_group. Change all uses. (class Layout): Declare find_or_add_kept_section, not add_comdat. * object.cc (Sized_relobj::Sized_relobj): Don't initialize comdat_groups_ field. (Sized_relobj::include_section_group): Use find_or_add_kept_section and Kept_section::group_sections. (Sized_relobj::include_linkonce_section): Likewise. * object.cc (class Sized_relobj): Don't define Comdat_group or Comdat_group_table. Remove find_comdat_group and add_comdat_group. Remove comdat_groups_ field. * plugin.cc (include_comdat_group): Use Layout::find_or_add_kept_section.
Diffstat (limited to 'gold/plugin.cc')
-rw-r--r--gold/plugin.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/plugin.cc b/gold/plugin.cc
index e58751e..4550371 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -506,7 +506,12 @@ Pluginobj::include_comdat_group(std::string comdat_key, Layout* layout)
// If this is the first time we've seen this comdat key, ask the
// layout object whether it should be included.
if (ins.second)
- ins.first->second = layout->add_comdat(NULL, 1, comdat_key, true);
+ {
+ Kept_section to_add(NULL, 1, true);
+ ins.first->second = layout->find_or_add_kept_section(comdat_key,
+ &to_add,
+ NULL);
+ }
return ins.first->second;
}