* elflink.c (set_symbol_value): Add isymbuf and locsymcount
[deliverable/binutils-gdb.git] / gold / output.h
index 4fb859b7c81a168df436e2755c0e46a4b9f88336..7f783d6e0b8335a70aec9a49171deeaca287dac0 100644 (file)
@@ -1,5 +1,25 @@
 // output.h -- manage the output file for gold   -*- C++ -*-
 
+// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Written by Ian Lance Taylor <iant@google.com>.
+
+// This file is part of gold.
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+// MA 02110-1301, USA.
+
 #ifndef GOLD_OUTPUT_H
 #define GOLD_OUTPUT_H
 
@@ -9,6 +29,7 @@
 #include "elfcpp.h"
 #include "layout.h"
 #include "reloc-types.h"
+#include "parameters.h"
 
 namespace gold
 {
@@ -183,9 +204,7 @@ class Output_data
 class Output_section_headers : public Output_data
 {
  public:
-  Output_section_headers(int size,
-                        bool big_endian,
-                        const Layout*,
+  Output_section_headers(const Layout*,
                         const Layout::Segment_list*,
                         const Layout::Section_list*,
                         const Stringpool*);
@@ -197,7 +216,7 @@ class Output_section_headers : public Output_data
   // Return the required alignment.
   uint64_t
   do_addralign() const
-  { return Output_data::default_alignment(this->size_); }
+  { return Output_data::default_alignment(parameters->get_size()); }
 
  private:
   // Write the data to the file with the right size and endianness.
@@ -205,8 +224,6 @@ class Output_section_headers : public Output_data
   void
   do_sized_write(Output_file*);
 
-  int size_;
-  bool big_endian_;
   const Layout* layout_;
   const Layout::Segment_list* segment_list_;
   const Layout::Section_list* unattached_section_list_;
@@ -218,8 +235,7 @@ class Output_section_headers : public Output_data
 class Output_segment_headers : public Output_data
 {
  public:
-  Output_segment_headers(int size, bool big_endian,
-                        const Layout::Segment_list& segment_list);
+  Output_segment_headers(const Layout::Segment_list& segment_list);
 
   // Write the data to the file.
   void
@@ -228,7 +244,7 @@ class Output_segment_headers : public Output_data
   // Return the required alignment.
   uint64_t
   do_addralign() const
-  { return Output_data::default_alignment(this->size_); }
+  { return Output_data::default_alignment(parameters->get_size()); }
 
  private:
   // Write the data to the file with the right size and endianness.
@@ -236,8 +252,6 @@ class Output_segment_headers : public Output_data
   void
   do_sized_write(Output_file*);
 
-  int size_;
-  bool big_endian_;
   const Layout::Segment_list& segment_list_;
 };
 
@@ -246,9 +260,7 @@ class Output_segment_headers : public Output_data
 class Output_file_header : public Output_data
 {
  public:
-  Output_file_header(int size,
-                    bool big_endian,
-                    const Target*,
+  Output_file_header(const Target*,
                     const Symbol_table*,
                     const Output_segment_headers*);
 
@@ -264,7 +276,7 @@ class Output_file_header : public Output_data
   // Return the required alignment.
   uint64_t
   do_addralign() const
-  { return Output_data::default_alignment(this->size_); }
+  { return Output_data::default_alignment(parameters->get_size()); }
 
   // Set the address and offset--we only implement this for error
   // checking.
@@ -278,8 +290,6 @@ class Output_file_header : public Output_data
   void
   do_sized_write(Output_file*);
 
-  int size_;
-  bool big_endian_;
   const Target* target_;
   const Symbol_table* symtab_;
   const Output_segment_headers* segment_header_;
@@ -1005,9 +1015,10 @@ class Output_data_got : public Output_section_data
 class Output_data_dynamic : public Output_section_data
 {
  public:
-  Output_data_dynamic(const Target* target, Stringpool* pool)
-    : Output_section_data(Output_data::default_alignment(target->get_size())),
-      target_(target), entries_(), pool_(pool)
+  Output_data_dynamic(Stringpool* pool)
+    : Output_section_data(Output_data::default_alignment(
+                          parameters->get_size())),
+      entries_(), pool_(pool)
   { }
 
   // Add a new dynamic entry with a fixed numeric value.
@@ -1130,8 +1141,6 @@ class Output_data_dynamic : public Output_section_data
   // The type of the list of entries.
   typedef std::vector<Dynamic_entry> Dynamic_entries;
 
-  // The target.
-  const Target* target_;
   // The entries.
   Dynamic_entries entries_;
   // The pool used for strings.
This page took 0.04901 seconds and 4 git commands to generate.