Add parameter to allow enabling/disabling selftests via configure
[deliverable/binutils-gdb.git] / gold / layout.h
index 806f6e53b01ac28650e6bdddb5b5d371e21873d8..8305b2af76b35b613edc4742bde1a4b5dccfce10 100644 (file)
@@ -693,6 +693,25 @@ class Layout
   layout_gnu_stack(bool seen_gnu_stack, uint64_t gnu_stack_flags,
                   const Object*);
 
+  // Layout a .note.gnu.property section.
+  void
+  layout_gnu_property(unsigned int note_type,
+                     unsigned int pr_type,
+                     size_t pr_datasz,
+                     const unsigned char* pr_data,
+                     const Object* object);
+
+  // Merge per-object properties with program properties.
+  void
+  merge_gnu_properties(const Object* object);
+
+  // Add a target-specific property for the output .note.gnu.property section.
+  void
+  add_gnu_property(unsigned int note_type,
+                  unsigned int pr_type,
+                  size_t pr_datasz,
+                  const unsigned char* pr_data);
+
   // Add an Output_section_data to the layout.  This is used for
   // special sections like the GOT section.  ORDER is where the
   // section should wind up in the output segment.  IS_RELRO is true
@@ -1061,6 +1080,10 @@ class Layout
   create_note(const char* name, int note_type, const char* section_name,
              size_t descsz, bool allocate, size_t* trailing_padding);
 
+  // Create a note section for gnu program properties.
+  void
+  create_gnu_properties_note();
+
   // Create a note section for gold version.
   void
   create_gold_note();
@@ -1347,6 +1370,14 @@ class Layout
     std::vector<Section_info> section_infos_;
   };
 
+  // Program properties from .note.gnu.property sections.
+  struct Gnu_property
+  {
+    size_t pr_datasz;
+    unsigned char* pr_data;
+  };
+  typedef std::map<unsigned int, Gnu_property> Gnu_properties;
+
   // The number of input files, for sizing tables.
   int number_of_input_files_;
   // Information set by scripts or by command line options.
@@ -1473,6 +1504,8 @@ class Layout
   Incremental_binary* incremental_base_;
   // For incremental links, a list of free space within the file.
   Free_list free_list_;
+  // Program properties.
+  Gnu_properties gnu_properties_;
 };
 
 // This task handles writing out data in output sections which is not
This page took 0.02663 seconds and 4 git commands to generate.