From Craig Silverstein: Minimal --script implementation.
[deliverable/binutils-gdb.git] / gold / layout.h
index 3e09d62ca30b1e4db2d1901284a1d1b9787abb28..19c8e09ee1000a021c81379a774720ed21b43cf8 100644 (file)
@@ -94,6 +94,13 @@ class Layout
   layout(Relobj *object, unsigned int shndx, const char* name,
         const elfcpp::Shdr<size, big_endian>& shdr, off_t* offset);
 
+  // Handle a GNU stack note.  This is called once per input object
+  // file.  SEEN_GNU_STACK is true if the object file has a
+  // .note.GNU-stack section.  GNU_STACK_FLAGS is the section flags
+  // from that section if there was one.
+  void
+  layout_gnu_stack(bool seen_gnu_stack, uint64_t gnu_stack_flags);
+
   // Add an Output_section_data to the layout.  This is used for
   // special sections like the GOT section.
   void
@@ -137,6 +144,11 @@ class Layout
   off_t
   finalize(const Input_objects*, Symbol_table*);
 
+  // Return the size of the output file.
+  off_t
+  output_file_size() const
+  { return this->output_file_size_; }
+
   // Return the TLS segment.  This will return NULL if there isn't
   // one.
   Output_segment*
@@ -213,6 +225,14 @@ class Layout
                  const elfcpp::Shdr<size, big_endian>&,
                  Output_section*, off_t*);
 
+  // Create a .note section for gold.
+  void
+  create_gold_note();
+
+  // Record whether the stack must be executable.
+  void
+  create_executable_stack_info(const Target*);
+
   // Find the first read-only PT_LOAD segment, creating one if
   // necessary.
   Output_segment*
@@ -248,6 +268,7 @@ class Layout
   // Create the version sections.
   void
   create_version_sections(const Versions*,
+                         const Symbol_table*,
                          unsigned int local_symcount,
                          const std::vector<Symbol*>& dynamic_symbols,
                          const Output_section* dynstr);
@@ -255,6 +276,7 @@ class Layout
   template<int size, bool big_endian>
   void
   sized_create_version_sections(const Versions* versions,
+                               const Symbol_table*,
                                unsigned int local_symcount,
                                const std::vector<Symbol*>& dynamic_symbols,
                                const Output_section* dynstr
@@ -364,6 +386,17 @@ class Layout
   Output_data_dynamic* dynamic_data_;
   // The exception frame section.
   Output_section* eh_frame_section_;
+  // The size of the output file.
+  off_t output_file_size_;
+  // Whether we have seen an object file marked to require an
+  // executable stack.
+  bool input_requires_executable_stack_;
+  // Whether we have seen at least one object file with an executable
+  // stack marker.
+  bool input_with_gnu_stack_note_;
+  // Whether we have seen at least one object file without an
+  // executable stack marker.
+  bool input_without_gnu_stack_note_;
 };
 
 // This task handles writing out data which is not part of a section
This page took 0.03217 seconds and 4 git commands to generate.