aboutsummaryrefslogtreecommitdiff
path: root/gold/output.h
diff options
context:
space:
mode:
authorDoug Kwan <dougkwan@google.com>2010-03-01 21:43:50 +0000
committerDoug Kwan <dougkwan@google.com>2010-03-01 21:43:50 +0000
commit2a0ff005c89d674c7e233c7fa612aa2434bcd8df (patch)
treef7cdface7116bfdf3188bd6d8b844deff74b551d /gold/output.h
parenta6f5ef51d7c85bd0b950fd182284f6cbff5fecf0 (diff)
downloadbinutils-2a0ff005c89d674c7e233c7fa612aa2434bcd8df.zip
binutils-2a0ff005c89d674c7e233c7fa612aa2434bcd8df.tar.gz
binutils-2a0ff005c89d674c7e233c7fa612aa2434bcd8df.tar.bz2
2010-03-01 Doug Kwan <dougkwan@google.com>
* layout.cc (Layout::Layout): Force section types of .init_array*, .preinit_array* and .fini_array* sections. * output.cc (Output_section::Input_section_sort_entry::has_priority): Fix check of return value of std::string::find.(). (Output_section::Input_section_sort_compare::operator()): Remove comment about .init_array. (Output_section::Input_section_sort_init_fini_compare::operator()): New method. (Output_section::sort_attached_input_sections): Handle .init_array and .fini_array specially. * output.h (Output_section::Inut_section_sort_compare): Update comment. (Output_section::Input_section_sort_init_fini_compare): New struct.
Diffstat (limited to 'gold/output.h')
-rw-r--r--gold/output.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gold/output.h b/gold/output.h
index 9008bdd..a63f07c 100644
--- a/gold/output.h
+++ b/gold/output.h
@@ -3378,7 +3378,7 @@ class Output_section : public Output_data
// This class is used to sort the input sections.
class Input_section_sort_entry;
- // This is the sort comparison function.
+ // This is the sort comparison function for ctors and dtors.
struct Input_section_sort_compare
{
bool
@@ -3386,6 +3386,14 @@ class Output_section : public Output_data
const Input_section_sort_entry&) const;
};
+ // This is the sort comparison function for .init_array and .fini_array.
+ struct Input_section_sort_init_fini_compare
+ {
+ bool
+ operator()(const Input_section_sort_entry&,
+ const Input_section_sort_entry&) const;
+ };
+
// Fill data. This is used to fill in data between input sections.
// It is also used for data statements (BYTE, WORD, etc.) in linker
// scripts. When we have to keep track of the input sections, we