llvm-project/lld/test/old-elf/X86_64/multi-weak-syms-order.test

14 lines
547 B
Plaintext

# Test for weak symbol getting overridden
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multi-weak.o -o %t --noinhibit-exec
RUN: llvm-nm -n %t | FileCheck -check-prefix=WEAKORDER %s
RUN: lld -flavor old-gnu -target x86_64 %p/Inputs/multi-weak.o -o %t2 --output-filetype=yaml --noinhibit-exec
RUN: FileCheck -check-prefix=WEAKATOMSORDER %s < %t2
WEAKORDER: {{[0-9a-f]+}} T fn
WEAKORDER: {{[0-9a-f]+}} T f
WEAKORDER: {{[0-9a-f]+}} T g
WEAKORDER: {{[0-9a-f]+}} T main
WEAKATOMSORDER: - name: f
WEAKATOMSORDER: - name: g