[lld] r289938 - [ELF] - Accept --sort-section=xxx command form.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 03:59:53 PST 2016
Author: grimar
Date: Fri Dec 16 05:59:52 2016
New Revision: 289938
URL: http://llvm.org/viewvc/llvm-project?rev=289938&view=rev
Log:
[ELF] - Accept --sort-section=xxx command form.
--sort-section=xxx is the same as --sort-section xxx,
was found in one of FreeBSD ports.
Modified:
lld/trunk/ELF/Options.td
lld/trunk/test/ELF/linkerscript/sort.s
Modified: lld/trunk/ELF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=289938&r1=289937&r2=289938&view=diff
==============================================================================
--- lld/trunk/ELF/Options.td (original)
+++ lld/trunk/ELF/Options.td Fri Dec 16 05:59:52 2016
@@ -275,6 +275,7 @@ def alias_script_T: JoinedOrSeparate<["-
def alias_shared_Bshareable: F<"Bshareable">, 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>;
def alias_script: J<"script=">, Alias<script>;
def alias_strip_all: Flag<["-"], "s">, Alias<strip_all>;
def alias_strip_debug_S: Flag<["-"], "S">, Alias<strip_debug>;
Modified: lld/trunk/test/ELF/linkerscript/sort.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/sort.s?rev=289938&r1=289937&r2=289938&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/sort.s (original)
+++ lld/trunk/test/ELF/linkerscript/sort.s Fri Dec 16 05:59:52 2016
@@ -76,6 +76,10 @@
# RUN: ld.lld --sort-section alignment -o %t8 --script %t7.script %t1.o %t2.o
# RUN: llvm-objdump -s %t8 | FileCheck -check-prefix=SORTED_ALIGNMENT %s
+## Check --sort-section= form.
+# RUN: ld.lld --sort-section=alignment -o %t8_1 --script %t7.script %t1.o %t2.o
+# RUN: llvm-objdump -s %t8_1 | FileCheck -check-prefix=SORTED_ALIGNMENT %s
+
## Check --sort-section name option.
# RUN: echo "SECTIONS { .aaa : { *(.aaa.*) } }" > %t8.script
# RUN: ld.lld --sort-section name -o %t9 --script %t8.script %t1.o %t2.o
More information about the llvm-commits
mailing list