diff options
Diffstat (limited to 'gold/layout.h')
-rw-r--r-- | gold/layout.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/gold/layout.h b/gold/layout.h index 13fafd6070..efa8b61d5a 100644 --- a/gold/layout.h +++ b/gold/layout.h @@ -46,6 +46,7 @@ class Output_section_headers; class Output_segment; class Output_data; class Output_data_dynamic; +class Output_symtab_xindex; class Eh_frame; class Target; @@ -193,6 +194,18 @@ class Layout dynpool() const { return &this->dynpool_; } + // Return the symtab_xindex section used to hold large section + // indexes for the normal symbol table. + Output_symtab_xindex* + symtab_xindex() const + { return this->symtab_xindex_; } + + // Return the dynsym_xindex section used to hold large section + // indexes for the dynamic symbol table. + Output_symtab_xindex* + dynsym_xindex() const + { return this->dynsym_xindex_; } + // Return whether a section is a .gnu.linkonce section, given the // section name. static inline bool @@ -407,7 +420,8 @@ class Layout // Create the output sections for the symbol table. void - create_symtab_sections(const Input_objects*, Symbol_table*, off_t*); + create_symtab_sections(const Input_objects*, Symbol_table*, + unsigned int, off_t*); // Create the .shstrtab section. Output_section* @@ -415,7 +429,7 @@ class Layout // Create the section header table. void - create_shdrs(off_t*); + create_shdrs(const Output_section* shstrtab_section, off_t*); // Create the dynamic symbol table. void @@ -470,6 +484,10 @@ class Layout static const char* linkonce_output_name(const char* name, size_t* plen); + // Return the number of allocated output sections. + size_t + allocated_output_section_count() const; + // Return the output section for NAME, TYPE and FLAGS. Output_section* get_output_section(const char* name, Stringpool::Key name_key, @@ -589,8 +607,12 @@ class Layout 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_. @@ -702,12 +724,13 @@ class Write_data_task : public Task class Write_symbols_task : public Task { public: - Write_symbols_task(const Symbol_table* symtab, + Write_symbols_task(const Layout* layout, const Symbol_table* symtab, const Input_objects* input_objects, const Stringpool* sympool, const Stringpool* dynpool, Output_file* of, Task_token* final_blocker) - : symtab_(symtab), input_objects_(input_objects), sympool_(sympool), - dynpool_(dynpool), of_(of), final_blocker_(final_blocker) + : layout_(layout), symtab_(symtab), input_objects_(input_objects), + sympool_(sympool), dynpool_(dynpool), of_(of), + final_blocker_(final_blocker) { } // The standard Task methods. @@ -726,6 +749,7 @@ class Write_symbols_task : public Task { return "Write_symbols_task"; } private: + const Layout* layout_; const Symbol_table* symtab_; const Input_objects* input_objects_; const Stringpool* sympool_; |