[ELF] - Accept --defsym foo=value form.

Previously we accepted --defsym=foo=value only.

Reported by Sean Silva.

llvm-svn: 302227
This commit is contained in:
George Rimar 2017-05-05 11:59:15 +00:00
parent 73b88d5183
commit bb451903f5
2 changed files with 6 additions and 0 deletions

View File

@ -290,6 +290,7 @@ def alias_L__library_path: J<"library-path=">, Alias<L>;
def alias_define_common_d: Flag<["-"], "d">, Alias<define_common>;
def alias_define_common_dc: F<"dc">, Alias<define_common>;
def alias_define_common_dp: F<"dp">, Alias<define_common>;
def alias_defsym: S<"defsym">, Alias<defsym>;
def alias_discard_all_x: Flag<["-"], "x">, Alias<discard_all>;
def alias_discard_locals_X: Flag<["-"], "X">, Alias<discard_locals>;
def alias_dynamic_list: J<"dynamic-list=">, Alias<dynamic_list>;

View File

@ -4,6 +4,11 @@
# RUN: llvm-readobj -t -s %t | FileCheck %s
# RUN: llvm-objdump -d -print-imm-hex %t | FileCheck %s --check-prefix=USE
## Check that we accept --defsym foo2=foo1 form.
# RUN: ld.lld -o %t2 %t.o --defsym foo2=foo1
# RUN: llvm-readobj -t -s %t2 | FileCheck %s
# RUN: llvm-objdump -d -print-imm-hex %t2 | FileCheck %s --check-prefix=USE
## In compare with GNU linkers, symbol defined with --defsym does
## not get aliased name in symbol table:
# CHECK: Symbol {