[ELF] - Accept --sort-section=xxx command form.

--sort-section=xxx is the same as --sort-section xxx,
was found in one of FreeBSD ports.

llvm-svn: 289938
This commit is contained in:
George Rimar 2016-12-16 11:59:52 +00:00
parent f159a3414f
commit b86448c669
2 changed files with 5 additions and 0 deletions

View File

@ -275,6 +275,7 @@ def alias_script_T: JoinedOrSeparate<["-"], "T">, Alias<script>;
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>;

View File

@ -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