+ // The section headers.
+ Output_section_headers* section_headers_;
+ // A pointer to the PT_TLS segment if there is one.
+ Output_segment* tls_segment_;
+ // The SHT_SYMTAB output section.
+ Output_section* symtab_section_;
+ // The SHT_SYMTAB_SHNDX for the regular symbol table if there is one.
+ Output_symtab_xindex* symtab_xindex_;
+ // The SHT_DYNSYM output section if there is one.
+ Output_section* dynsym_section_;
+ // The SHT_SYMTAB_SHNDX for the dynamic symbol table if there is one.
+ Output_symtab_xindex* dynsym_xindex_;
+ // The SHT_DYNAMIC output section if there is one.
+ Output_section* dynamic_section_;
+ // The dynamic data which goes into dynamic_section_.
+ Output_data_dynamic* dynamic_data_;
+ // The exception frame output section if there is one.
+ Output_section* eh_frame_section_;
+ // The exception frame data for eh_frame_section_.
+ Eh_frame* eh_frame_data_;
+ // Whether we have added eh_frame_data_ to the .eh_frame section.
+ bool added_eh_frame_data_;
+ // The exception frame header output section if there is one.
+ Output_section* eh_frame_hdr_section_;
+ // The space for the build ID checksum if there is one.
+ Output_section_data* build_id_note_;
+ // A list of group sections and their signatures.
+ Group_signatures group_signatures_;
+ // 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_;
+ // Whether we have seen an object file that uses the static TLS model.
+ bool has_static_tls_;
+ // Whether any sections require postprocessing.
+ bool any_postprocessing_sections_;
+};
+
+// This task handles writing out data in output sections which is not
+// part of an input section, or which requires special handling. When
+// this is done, it unblocks both output_sections_blocker and
+// final_blocker.
+
+class Write_sections_task : public Task
+{
+ public:
+ Write_sections_task(const Layout* layout, Output_file* of,
+ Task_token* output_sections_blocker,
+ Task_token* final_blocker)
+ : layout_(layout), of_(of),
+ output_sections_blocker_(output_sections_blocker),
+ final_blocker_(final_blocker)
+ { }
+
+ // The standard Task methods.
+
+ Task_token*
+ is_runnable();
+
+ void
+ locks(Task_locker*);
+
+ void
+ run(Workqueue*);
+
+ std::string
+ get_name() const
+ { return "Write_sections_task"; }
+
+ private:
+ class Write_sections_locker;
+
+ const Layout* layout_;
+ Output_file* of_;
+ Task_token* output_sections_blocker_;
+ Task_token* final_blocker_;