2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: echo "foo = 0x22;" > %t.script
5 ## This testcase checks that we apply -defsym and linker script
6 ## in the same order are they specified in a command line.
8 ## Check that linker script can override -defsym assignments.
9 # RUN: ld.lld %t.o -defsym=foo=0x11 -script %t.script -o %t
10 # RUN: llvm-readobj --symbols %t | FileCheck %s
12 # CHECK-NEXT: Value: 0x22
14 ## Check that -defsym can override linker script. Check that multiple
15 ## -defsym commands for the same symbol are allowed.
16 # RUN: ld.lld %t.o -script %t.script -defsym=foo=0x11 -defsym=foo=0x33 -o %t
17 # RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=REORDER
19 # REORDER-NEXT: Value: 0x33