* output.cc (Output_segment::add_output_section): Remove front
authorIan Lance Taylor <ian@airs.com>
Fri, 16 May 2008 22:29:04 +0000 (22:29 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 16 May 2008 22:29:04 +0000 (22:29 +0000)
parameter.
* output.h (class Output_segment): Remove
add_initial_output_section and overloaded add_output_section.
Update declaration of remaining add_output_section.
* layout.cc (Layout::create_interp): Call add_output_section
rather than add_initial_output_section.
(Layout::finish_dynamic_section): Likewise.

gold/ChangeLog
gold/layout.cc
gold/output.cc
gold/output.h

index c282214b6db1a142419ed5dfa7289af916dcd671..10126102d0ca355a03909db851aeb427b897288b 100644 (file)
@@ -1,5 +1,14 @@
 2008-05-16  Ian Lance Taylor  <iant@google.com>
 
+       * output.cc (Output_segment::add_output_section): Remove front
+       parameter.
+       * output.h (class Output_segment): Remove
+       add_initial_output_section and overloaded add_output_section.
+       Update declaration of remaining add_output_section.
+       * layout.cc (Layout::create_interp): Call add_output_section
+       rather than add_initial_output_section.
+       (Layout::finish_dynamic_section): Likewise.
+
        * i386.cc (Target_i386::Relocate::relocate_tls): Set dynamic type
        for TLS_GOTDESC and TLS_DESC_CALL.  Only optimize TLS_LDO_32 if we
        know the dynamic type.
index 85648d31a3e0457471921891b44d3f59c9ad5430..07e905642e74e725a34ac60d2c708f6b19b529e9 100644 (file)
@@ -2479,7 +2479,7 @@ Layout::create_interp(const Target* target)
     {
       Output_segment* oseg = this->make_output_segment(elfcpp::PT_INTERP,
                                                       elfcpp::PF_R);
-      oseg->add_initial_output_section(osec, elfcpp::PF_R);
+      oseg->add_output_section(osec, elfcpp::PF_R);
     }
 }
 
@@ -2494,8 +2494,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
       Output_segment* oseg = this->make_output_segment(elfcpp::PT_DYNAMIC,
                                                       (elfcpp::PF_R
                                                        | elfcpp::PF_W));
-      oseg->add_initial_output_section(this->dynamic_section_,
-                                      elfcpp::PF_R | elfcpp::PF_W);
+      oseg->add_output_section(this->dynamic_section_,
+                              elfcpp::PF_R | elfcpp::PF_W);
     }
 
   Output_data_dynamic* const odyn = this->dynamic_data_;
index ce29b53ccbb143b3adacf1a3da05ac574dbe02e0..5459a574bf15a5227fa81d957083d9db9db257c7 100644 (file)
@@ -2579,8 +2579,7 @@ Output_segment::Output_segment(elfcpp::Elf_Word type, elfcpp::Elf_Word flags)
 
 void
 Output_segment::add_output_section(Output_section* os,
-                                  elfcpp::Elf_Word seg_flags,
-                                  bool front)
+                                  elfcpp::Elf_Word seg_flags)
 {
   gold_assert((os->flags() & elfcpp::SHF_ALLOC) != 0);
   gold_assert(!this->is_max_align_known_);
@@ -2615,7 +2614,6 @@ Output_segment::add_output_section(Output_section* os,
          --p;
          if ((*p)->is_section_type(elfcpp::SHT_NOTE))
            {
-             // We don't worry about the FRONT parameter.
              ++p;
              pdl->insert(p, os);
              return;
@@ -2660,7 +2658,6 @@ Output_segment::add_output_section(Output_section* os,
 
          if (insert)
            {
-             // We don't worry about the FRONT parameter.
              ++p;
              pdl->insert(p, os);
              return;
@@ -2672,10 +2669,7 @@ Output_segment::add_output_section(Output_section* os,
       // location in the section list.
     }
 
-  if (front)
-    pdl->push_front(os);
-  else
-    pdl->push_back(os);
+  pdl->push_back(os);
 }
 
 // Remove an Output_section from this segment.  It is an error if it
index 7c24372fed8150796163e96645817ebc223ab548..b4dbbd18f8d816f0f5224f7ba812f8410a491417 100644 (file)
@@ -2682,13 +2682,7 @@ class Output_segment
 
   // Add an Output_section to this segment.
   void
-  add_output_section(Output_section* os, elfcpp::Elf_Word seg_flags)
-  { this->add_output_section(os, seg_flags, false); }
-
-  // Add an Output_section to the start of this segment.
-  void
-  add_initial_output_section(Output_section* os, elfcpp::Elf_Word seg_flags)
-  { this->add_output_section(os, seg_flags, true); }
+  add_output_section(Output_section* os, elfcpp::Elf_Word seg_flags);
 
   // Remove an Output_section from this segment.  It is an error if it
   // is not present.
@@ -2787,11 +2781,6 @@ class Output_segment
 
   typedef std::list<Output_data*> Output_data_list;
 
-  // Add an Output_section to this segment, specifying front or back.
-  void
-  add_output_section(Output_section*, elfcpp::Elf_Word seg_flags,
-                    bool front);
-
   // Find the maximum alignment in an Output_data_list.
   static uint64_t
   maximum_alignment_list(const Output_data_list*);
This page took 0.034662 seconds and 4 git commands to generate.