aboutsummaryrefslogtreecommitdiff
path: root/gold/dynobj.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-02 23:48:49 +0000
committerIan Lance Taylor <iant@google.com>2008-01-02 23:48:49 +0000
commitcb29561284eaa37c5c8967e49a5db0a4064368bf (patch)
treef4e88f9b60483aeb87c7cbfda3445f3da58edcc0 /gold/dynobj.cc
parent2745d86e69ec4659f39cfe0406948578f791ac4f (diff)
downloadfsf-binutils-gdb-cb29561284eaa37c5c8967e49a5db0a4064368bf.zip
fsf-binutils-gdb-cb29561284eaa37c5c8967e49a5db0a4064368bf.tar.gz
fsf-binutils-gdb-cb29561284eaa37c5c8967e49a5db0a4064368bf.tar.bz2
Reduce the number of system calls. Use readv instead of pread. Do
better handling of cached views.
Diffstat (limited to 'gold/dynobj.cc')
-rw-r--r--gold/dynobj.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/dynobj.cc b/gold/dynobj.cc
index 7e61007..3c3549d 100644
--- a/gold/dynobj.cc
+++ b/gold/dynobj.cc
@@ -335,7 +335,7 @@ Sized_dynobj<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
sd->symbol_names = this->get_lasting_view(strtabshdr.get_sh_offset(),
strtabshdr.get_sh_size(),
- true);
+ false);
sd->symbol_names_size =
convert_to_section_size_type(strtabshdr.get_sh_size());
@@ -667,6 +667,10 @@ Sized_dynobj<size, big_endian>::do_add_symbols(Symbol_table* symtab,
delete sd->verneed;
sd->verneed = NULL;
}
+
+ // This is normally the last time we will read any data from this
+ // file.
+ this->clear_view_cache_marks();
}
// Given a vector of hash codes, compute the number of hash buckets to