summaryrefslogtreecommitdiff
path: root/tools/gold
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gold')
-rw-r--r--tools/gold/gold-plugin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index 133eca48e5..77717098d6 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -252,9 +252,8 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
if (file->offset) {
offset = file->offset;
}
- if (error_code ec =
- MemoryBuffer::getOpenFile(file->fd, file->name, buffer, -1,
- file->filesize, offset, false)) {
+ if (error_code ec = MemoryBuffer::getOpenFileSlice(
+ file->fd, file->name, buffer, file->filesize, offset)) {
(*message)(LDPL_ERROR, ec.message().c_str());
return LDPS_ERR;
}