* ldexp.c: Add LOG2CEIL() builtin function to linker script language
[binutils-gdb.git] / gold / output.h
index bd108bbd418f5d578f295afefeea9b05b5f9fdd1..1bcdfea1faca99bcb0c137ef65b0e63fbc1d158e 100644 (file)
@@ -3300,6 +3300,10 @@ class Output_section : public Output_data
     this->dynsym_index_ = index;
   }
 
+  // Sort the attached input sections.
+  void
+  sort_attached_input_sections();
+
   // Return whether the input sections sections attachd to this output
   // section may require sorting.  This is used to handle constructor
   // priorities compatibly with GNU ld.
@@ -3941,6 +3945,10 @@ class Output_section : public Output_data
   input_sections() const
   { return this->input_sections_; }
 
+  Input_section_list&
+  input_sections()
+  { return this->input_sections_; }
+
  protected:
   // Return the output section--i.e., the object itself.
   Output_section*
@@ -4192,6 +4200,23 @@ class Output_section : public Output_data
               const Input_section_sort_entry&) const;
   };
 
+  // This is the sort comparison function for .text to sort sections with
+  // prefixes .text.{unlikely,exit,startup,hot} before other sections.
+  struct Input_section_sort_section_prefix_special_ordering_compare
+  {
+    bool
+    operator()(const Input_section_sort_entry&,
+              const Input_section_sort_entry&) const;
+  };
+
+  // This is the sort comparison function for sorting sections by name.
+  struct Input_section_sort_section_name_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
@@ -4249,10 +4274,6 @@ class Output_section : public Output_data
   add_output_merge_section(Output_section_data* posd, bool is_string,
                           uint64_t entsize);
 
-  // Sort the attached input sections.
-  void
-  sort_attached_input_sections();
-
   // Find the merge section into which an input section with index SHNDX in
   // OBJECT has been added.  Return NULL if none found.
   Output_section_data*