This patch is to support --defsym option for ELF file format/GNU-compatible driver. Currently it takes a symbol name followed by '=' and a number. If such option is given, the driver sets up an absolute symbol with the specified address. You can specify multiple --defsym options to define multiple symbols. GNU LD's --defsym provides many more features. For example, it allows users to specify another symbol name instead of a number to define a symbol alias, or it even allows a symbol plus an offset (e.g. --defsym=foo+3) to define symbol- relative alias. This patch does not support that, but will be supported in subsequent patches. Differential Revision: http://llvm-reviews.chandlerc.com/D3208 llvm-svn: 205029
9 lines
322 B
Plaintext
9 lines
322 B
Plaintext
# RUN: yaml2obj %p/Inputs/nop.obj.yaml > %t.obj
|
|
#
|
|
# RUN: not lld -flavor link /out:%t.exe /include:sym1 /include:sym2 \
|
|
# RUN: /subsystem:console -- %t.obj 2> %t.log
|
|
# RUN: FileCheck %s < %t.log
|
|
|
|
CHECK: Undefined symbol: <command line option /include>: sym1
|
|
CHECK: Undefined symbol: <command line option /include>: sym2
|