diff options
author | Ian Lance Taylor <iant@google.com> | 2007-05-16 17:42:48 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-05-16 17:42:48 +0000 |
commit | b8e6aad9606384125f588d531c567f49bad346e2 (patch) | |
tree | e1172d50384713b91c329cc88cabcd2728f929a9 /gold/layout.cc | |
parent | 60dfee729999b913a247956c4816e758afb86a4b (diff) | |
download | gdb-b8e6aad9606384125f588d531c567f49bad346e2.zip gdb-b8e6aad9606384125f588d531c567f49bad346e2.tar.gz gdb-b8e6aad9606384125f588d531c567f49bad346e2.tar.bz2 |
Add support for SHF_MERGE sections.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index c150707..62ba5f3 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -133,7 +133,9 @@ Layout::get_output_section(const char* name, Stringpool::Key name_key, // We should ignore some flags. flags &= ~ (elfcpp::SHF_INFO_LINK | elfcpp::SHF_LINK_ORDER - | elfcpp::SHF_GROUP); + | elfcpp::SHF_GROUP + | elfcpp::SHF_MERGE + | elfcpp::SHF_STRINGS); const Key key(name_key, std::make_pair(type, flags)); const std::pair<Key, Output_section*> v(key, NULL); @@ -224,7 +226,7 @@ Output_section* Layout::make_output_section(const char* name, elfcpp::Elf_Word type, elfcpp::Elf_Xword flags) { - Output_section* os = new Output_section(name, type, flags, true); + Output_section* os = new Output_section(name, type, flags); this->section_list_.push_back(os); if ((flags & elfcpp::SHF_ALLOC) == 0) @@ -466,7 +468,6 @@ Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab) off_t off = this->set_segment_offsets(target, load_seg, &shndx); // Create the symbol table sections. - // FIXME: We don't need to do this if we are stripping symbols. this->create_symtab_sections(size, input_objects, symtab, &off); // Create the .shstrtab section. @@ -690,7 +691,9 @@ Layout::set_section_offsets(off_t off, unsigned int* pshndx) return off; } -// Create the symbol table sections. +// Create the symbol table sections. Here we also set the final +// values of the symbols. At this point all the loadable sections are +// fully laid out. void Layout::create_symtab_sections(int size, const Input_objects* input_objects, |