From 67f95b96b4d5e8e19520d94bebae92db2f67af74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Mon, 23 Mar 2015 09:16:49 -0400 Subject: 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. --- gold/merge.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gold/merge.h') 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(static_cast( + this)->get_input_merge_map(shndx)); + } // Get or make the Input_merge_map to use for the section SHNDX // with MERGE_MAP. -- cgit v1.1