summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-02-27 20:15:37 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-02-27 20:15:37 +0000
commit35358e02bbd584af79132df82ad346c2e32cae21 (patch)
tree4ee8b590bcd6b9916b7d9a3d6d144f4d46ae4d96 /tools
parent9e9bb0871d8f6d026afed6c127373222eab233e3 (diff)
downloadllvm-35358e02bbd584af79132df82ad346c2e32cae21.tar.gz
llvm-35358e02bbd584af79132df82ad346c2e32cae21.tar.bz2
llvm-35358e02bbd584af79132df82ad346c2e32cae21.tar.xz
bfd was fixed, remove the work around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gold/gold-plugin.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index 7ce1760025..950c7435ec 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -274,19 +274,8 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
}
free(buf);
} else {
- // FIXME: We should not need to pass -1 as the file size, but there
- // is a bug in BFD that causes it to pass 0 to us. Remove this once
- // that is fixed.
- off_t size = file->filesize ? file->filesize : -1;
-
- // FIXME: We should not need to reset the position in the file, but there
- // is a bug in BFD. Remove this once that is fixed.
- off_t old_pos = lseek(file->fd, 0, SEEK_CUR);
-
lseek(file->fd, 0, SEEK_SET);
- M = lto_module_create_from_fd(file->fd, file->name, size);
-
- lseek(file->fd, old_pos, SEEK_SET);
+ M = lto_module_create_from_fd(file->fd, file->name, file->filesize);
if (!M)
return LDPS_OK;
}