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
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*
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*
// 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);
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
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