[lld] r196363 - [PECOFF] Ignore /functionpadmin option.

Rui Ueyama ruiu at google.com
Wed Dec 4 00:15:05 PST 2013


Author: ruiu
Date: Wed Dec  4 02:15:05 2013
New Revision: 196363

URL: http://llvm.org/viewvc/llvm-project?rev=196363&view=rev
Log:
[PECOFF] Ignore /functionpadmin option.

If /functionpadmin is specified, the linker is supposed to make room at the
beginning of each function, so that self-modifying program would easily
hotpatch existing functions. Since I'm not sure if this feature is really used,
I'll make LLD to ignore the option for now.

Modified:
    lld/trunk/lib/Driver/WinLinkOptions.td
    lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp

Modified: lld/trunk/lib/Driver/WinLinkOptions.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkOptions.td?rev=196363&r1=196362&r2=196363&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkOptions.td (original)
+++ lld/trunk/lib/Driver/WinLinkOptions.td Wed Dec  4 02:15:05 2013
@@ -90,6 +90,7 @@ multiclass QB<string name> {
   def _no : F<name#":no">;
 }
 
+def functionpadmin : F<"functionpadmin">;
 def ignoreidl : F<"ignoreidl">;
 def incremental : F<"incremental">;
 def no_incremental : F<"incremental:no">;

Modified: lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp?rev=196363&r1=196362&r2=196363&view=diff
==============================================================================
--- lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp (original)
+++ lld/trunk/unittests/DriverTests/WinLinkDriverTest.cpp Wed Dec  4 02:15:05 2013
@@ -565,7 +565,7 @@ TEST_F(WinLinkParserTest, Ignore) {
                     "/pdbaltpath:bar", "/verbose", "/verbose:icf", "/wx",
                     "/wx:no", "/tlbid:1", "/tlbout:foo", "/idlout:foo",
                     "/ignoreidl", "/implib:foo", "/safeseh", "/safeseh:no",
-                    "a.obj", nullptr));
+                    "/functionpadmin", "a.obj", nullptr));
   EXPECT_EQ("", errorMessage());
   EXPECT_EQ(1, inputFileCount());
   EXPECT_EQ("a.obj", inputFile(0));





More information about the llvm-commits mailing list