aboutsummaryrefslogtreecommitdiff
path: root/gold/merge.h
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-03-23 09:16:49 -0400
committerRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-03-23 09:16:49 -0400
commit67f95b96b4d5e8e19520d94bebae92db2f67af74 (patch)
treec98a68289748714bf336f1e5797718ce3e27cbca /gold/merge.h
parent99067e2973a6bb1d3a52caafb479ebdc1a420580 (diff)
downloadgdb-67f95b96b4d5e8e19520d94bebae92db2f67af74.zip
gdb-67f95b96b4d5e8e19520d94bebae92db2f67af74.tar.gz
gdb-67f95b96b4d5e8e19520d94bebae92db2f67af74.tar.bz2
Remove is_merge_section_for.
Now that Input_merge_map has an Output_section_data, we can use it in implementing find_merge_section and replace the only use of is_merge_section_for with it.
Diffstat (limited to 'gold/merge.h')
-rw-r--r--gold/merge.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/gold/merge.h b/gold/merge.h
index 3e500bc..62efa13 100644
--- a/gold/merge.h
+++ b/gold/merge.h
@@ -71,9 +71,8 @@ class Object_merge_map
section_offset_type offset,
section_offset_type* output_offset);
- // Return whether this is the merge map for section SHNDX.
- bool
- is_merge_section_for(const Output_section_data*, unsigned int shndx);
+ const Output_section_data*
+ find_merge_section(unsigned int shndx) const;
// Initialize an mapping from input offsets to output addresses for
// section SHNDX. STARTING_ADDRESS is the output address of the
@@ -148,8 +147,14 @@ class Object_merge_map
// Return a pointer to the Input_merge_map to use for the input
// section SHNDX, or NULL.
- Input_merge_map*
- get_input_merge_map(unsigned int shndx);
+ const Input_merge_map*
+ get_input_merge_map(unsigned int shndx) const;
+
+ Input_merge_map *
+ get_input_merge_map(unsigned int shndx) {
+ return const_cast<Input_merge_map *>(static_cast<const Object_merge_map *>(
+ this)->get_input_merge_map(shndx));
+ }
// Get or make the Input_merge_map to use for the section SHNDX
// with MERGE_MAP.