summaryrefslogtreecommitdiffstats
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
commit92c06ba158e984cc29deb3658be6f57ac71d98d0 (patch)
tree1155248810d3e604d2119477f6661ffa6a2b7a91
parent25bddae404bcb7a425abafb45977055e6d1f21c1 (diff)
downloadbcm5719-llvm-92c06ba158e984cc29deb3658be6f57ac71d98d0.tar.gz
bcm5719-llvm-92c06ba158e984cc29deb3658be6f57ac71d98d0.zip
bfd was fixed, remove the work around.
llvm-svn: 126579
-rw-r--r--llvm/tools/gold/gold-plugin.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 7ce17600255..950c7435ec2 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud