diff options
author | Ian Lance Taylor <iant@google.com> | 2006-11-06 22:46:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-11-06 22:46:08 +0000 |
commit | f6ce93d6e999d1a0c450c5e71c5b3468e6217f0a (patch) | |
tree | 945ecd482d35d1c2a590645ef3d5f41fb83dcc4b /gold/archive.cc | |
parent | 8d9455b422d98d97f090923445aa2680e6882f20 (diff) | |
download | gdb-f6ce93d6e999d1a0c450c5e71c5b3468e6217f0a.zip gdb-f6ce93d6e999d1a0c450c5e71c5b3468e6217f0a.tar.gz gdb-f6ce93d6e999d1a0c450c5e71c5b3468e6217f0a.tar.bz2 |
Split Object into Dynobj and Relobj, incorporate elfcpp swapping changes.
Diffstat (limited to 'gold/archive.cc')
-rw-r--r-- | gold/archive.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gold/archive.cc b/gold/archive.cc index 031ead0..d085403 100644 --- a/gold/archive.cc +++ b/gold/archive.cc @@ -70,7 +70,7 @@ Archive::setup() // Numbers in the armap are always big-endian. const elfcpp::Elf_Word* pword = reinterpret_cast<const elfcpp::Elf_Word*>(p); - unsigned int nsyms = elfcpp::read_elf_word<true>(pword); + unsigned int nsyms = elfcpp::Swap<32, true>::readval(pword); ++pword; // Note that the addition is in units of sizeof(elfcpp::Elf_Word). @@ -81,7 +81,7 @@ Archive::setup() for (unsigned int i = 0; i < nsyms; ++i) { this->armap_[i].name = pnames; - this->armap_[i].offset = elfcpp::read_elf_word<true>(pword); + this->armap_[i].offset = elfcpp::Swap<32, true>::readval(pword); pnames += strlen(pnames) + 1; ++pword; } @@ -215,8 +215,8 @@ Archive::read_header(off_t off, std::string* pname) // may be satisfied by other objects in the archive. void -Archive::add_symbols(Symbol_table* symtab, Layout* layout, - Input_objects* input_objects) +Archive::add_symbols(const General_options& options, Symbol_table* symtab, + Layout* layout, Input_objects* input_objects) { const size_t armap_size = this->armap_.size(); @@ -248,7 +248,7 @@ Archive::add_symbols(Symbol_table* symtab, Layout* layout, // We want to include this object in the link. last = this->armap_[i].offset; - this->include_member(symtab, layout, input_objects, last); + this->include_member(options, symtab, layout, input_objects, last); this->seen_[i] = true; added_new_object = true; } @@ -260,8 +260,9 @@ Archive::add_symbols(Symbol_table* symtab, Layout* layout, // the member header. void -Archive::include_member(Symbol_table* symtab, Layout* layout, - Input_objects* input_objects, off_t off) +Archive::include_member(const General_options& options, Symbol_table* symtab, + Layout* layout, Input_objects* input_objects, + off_t off) { std::string n; this->read_header(off, &n); @@ -303,7 +304,7 @@ Archive::include_member(Symbol_table* symtab, Layout* layout, Read_symbols_data sd; obj->read_symbols(&sd); - obj->layout(layout, &sd); + obj->layout(options, symtab, layout, &sd); obj->add_symbols(symtab, &sd); } @@ -352,7 +353,7 @@ Add_archive_symbols::locks(Workqueue* workqueue) void Add_archive_symbols::run(Workqueue*) { - this->archive_->add_symbols(this->symtab_, this->layout_, + this->archive_->add_symbols(this->options_, this->symtab_, this->layout_, this->input_objects_); if (this->input_group_ != NULL) |