[PATCH] D29681: Handle -G as an alias to -shared
Rafael Ávila de Espíndola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 7 14:40:54 PST 2017
rafael updated this revision to Diff 87523.
rafael added a comment.
fix comment
https://reviews.llvm.org/D29681
Files:
ELF/Options.td
test/ELF/g-is-shared.s
Index: test/ELF/g-is-shared.s
===================================================================
--- /dev/null
+++ test/ELF/g-is-shared.s
@@ -0,0 +1,8 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+
+# The -G option without any value is equivalent to -shared.
+# RUN: ld.lld -G %t.o -o %t.so
+# RUN: llvm-readobj -file-headers %t.so | FileCheck %s
+# CHECK: Type: SharedObject
Index: ELF/Options.td
===================================================================
--- ELF/Options.td
+++ ELF/Options.td
@@ -306,6 +306,7 @@
def alias_rpath_rpath: J<"rpath=">, Alias<rpath>;
def alias_script_T: JoinedOrSeparate<["-"], "T">, Alias<script>;
def alias_shared_Bshareable: F<"Bshareable">, Alias<shared>;
+def alias_shared_G: F<"G">, Alias<shared>;
def alias_soname_h: JoinedOrSeparate<["-"], "h">, Alias<soname>;
def alias_soname_soname: S<"soname">, Alias<soname>;
def alias_sort_section: J<"sort-section=">, Alias<sort_section>;
@@ -366,7 +367,6 @@
def warn_shared_textrel: F<"warn-shared-textrel">;
def EB : F<"EB">;
def EL : F<"EL">;
-def G: JoinedOrSeparate<["-"], "G">;
def Qy : F<"Qy">;
// Aliases for ignored options
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29681.87523.patch
Type: text/x-patch
Size: 1177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/f6432de9/attachment.bin>
More information about the llvm-commits
mailing list