aboutsummaryrefslogtreecommitdiff
path: root/gold/dynobj.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-25 17:50:26 +0000
committerIan Lance Taylor <iant@google.com>2007-09-25 17:50:26 +0000
commit9eb9fa57c2a9eec4c08491715d3341df811b7f9c (patch)
treec68eac98b999ebfb3251ab5f9851900bf8e4179b /gold/dynobj.cc
parent0b058123a01a282fe112ee8863bfbf0abf89f29b (diff)
downloadfsf-binutils-gdb-9eb9fa57c2a9eec4c08491715d3341df811b7f9c.zip
fsf-binutils-gdb-9eb9fa57c2a9eec4c08491715d3341df811b7f9c.tar.gz
fsf-binutils-gdb-9eb9fa57c2a9eec4c08491715d3341df811b7f9c.tar.bz2
Add cache parameter to get_view. Discard uncached views on unlock.
Fix bug this exposed in archive armap symbol name handling.
Diffstat (limited to 'gold/dynobj.cc')
-rw-r--r--gold/dynobj.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gold/dynobj.cc b/gold/dynobj.cc
index b6255f8..2ccb8f5 100644
--- a/gold/dynobj.cc
+++ b/gold/dynobj.cc
@@ -174,7 +174,8 @@ Sized_dynobj<size, big_endian>::read_dynsym_section(
gold_exit(false);
}
- *view = this->get_lasting_view(shdr.get_sh_offset(), shdr.get_sh_size());
+ *view = this->get_lasting_view(shdr.get_sh_offset(), shdr.get_sh_size(),
+ false);
*view_size = shdr.get_sh_size();
*view_info = shdr.get_sh_info();
}
@@ -198,7 +199,7 @@ Sized_dynobj<size, big_endian>::set_soname(const unsigned char* pshdrs,
const off_t dynamic_size = dynamicshdr.get_sh_size();
const unsigned char* pdynamic = this->get_view(dynamicshdr.get_sh_offset(),
- dynamic_size);
+ dynamic_size, false);
const unsigned int link = dynamicshdr.get_sh_link();
if (link != strtab_shndx)
@@ -223,7 +224,7 @@ Sized_dynobj<size, big_endian>::set_soname(const unsigned char* pshdrs,
}
strtab_size = strtabshdr.get_sh_size();
- strtabu = this->get_view(strtabshdr.get_sh_offset(), strtab_size);
+ strtabu = this->get_view(strtabshdr.get_sh_offset(), strtab_size, false);
}
for (const unsigned char* p = pdynamic;
@@ -295,7 +296,7 @@ Sized_dynobj<size, big_endian>::do_read_symbols(Read_symbols_data* sd)
gold_assert(dynsymshdr.get_sh_type() == elfcpp::SHT_DYNSYM);
sd->symbols = this->get_lasting_view(dynsymshdr.get_sh_offset(),
- dynsymshdr.get_sh_size());
+ dynsymshdr.get_sh_size(), false);
sd->symbols_size = dynsymshdr.get_sh_size();
// Get the symbol names.
@@ -319,7 +320,8 @@ 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());
+ strtabshdr.get_sh_size(),
+ true);
sd->symbol_names_size = strtabshdr.get_sh_size();
// Get the version information.