aboutsummaryrefslogtreecommitdiff
path: root/gold/archive.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-25 00:27:29 +0000
committerIan Lance Taylor <iant@google.com>2007-09-25 00:27:29 +0000
commitba45d2478b259454e5b4c2d7dcaa7a35ecbf329c (patch)
treee9d069c39988c400a7f41583978372080b661a92 /gold/archive.cc
parent5f67a19ce6e7ddd10473df8e2754d9d229c884fe (diff)
downloadgdb-ba45d2478b259454e5b4c2d7dcaa7a35ecbf329c.zip
gdb-ba45d2478b259454e5b4c2d7dcaa7a35ecbf329c.tar.gz
gdb-ba45d2478b259454e5b4c2d7dcaa7a35ecbf329c.tar.bz2
Break out default pbytes argument to read and get_view routines,
adding new routines.
Diffstat (limited to 'gold/archive.cc')
-rw-r--r--gold/archive.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gold/archive.cc b/gold/archive.cc
index ef6ff74..f7194f8 100644
--- a/gold/archive.cc
+++ b/gold/archive.cc
@@ -329,8 +329,9 @@ Archive::include_all_members(Symbol_table* symtab, Layout* layout,
while (true)
{
off_t bytes;
- const unsigned char* p = this->get_view(off, sizeof(Archive_header),
- &bytes);
+ const unsigned char* p = this->get_view_and_size(off,
+ sizeof(Archive_header),
+ &bytes);
if (bytes < sizeof(Archive_header))
{
if (bytes != 0)
@@ -379,9 +380,8 @@ Archive::include_member(Symbol_table* symtab, Layout* layout,
// Read enough of the file to pick up the entire ELF header.
int ehdr_size = elfcpp::Elf_sizes<64>::ehdr_size;
off_t bytes;
- const unsigned char* p = this->input_file_->file().get_view(memoff,
- ehdr_size,
- &bytes);
+ const unsigned char* p =
+ this->input_file_->file().get_view_and_size(memoff, ehdr_size, &bytes);
if (bytes < 4)
{
fprintf(stderr, _("%s: %s: member at %ld is not an ELF object"),