[llvm-commits] [llvm] r126579 - /llvm/trunk/tools/gold/gold-plugin.cpp

Rafael Espindola rafael.espindola at gmail.com
Sun Feb 27 12:15:37 PST 2011


Author: rafael
Date: Sun Feb 27 14:15:37 2011
New Revision: 126579

URL: http://llvm.org/viewvc/llvm-project?rev=126579&view=rev
Log:
bfd was fixed, remove the work around.

Modified:
    llvm/trunk/tools/gold/gold-plugin.cpp

Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=126579&r1=126578&r2=126579&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Sun Feb 27 14:15:37 2011
@@ -274,19 +274,8 @@
     }
     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;
   }





More information about the llvm-commits mailing list