1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/MC/ELF/section-linkorder-error.s
Fangrui Song 7c84cd8ff5 [MC][ELF] Rename MC related "Associated" to "LinkedToSym"
"linked-to section" is used by the ELF spec. By analogy, "linked-to
symbol" is a good name for the signature symbol.  The word "linked-to"
implies a directed edge and makes it clear its relation with "sh_link",
while one can argue that "associated" means an undirected edge.

Also, combine tests and add precise SMLoc to improve diagnostics.

Reviewed By: eugenis, grimar, jhenderson

Differential Revision: https://reviews.llvm.org/D74082
2020-02-06 11:31:04 -08:00

19 lines
652 B
ArmAsm

# RUN: not llvm-mc -triple x86_64 %s -o /dev/null 2>&1 | FileCheck %s
# CHECK: {{.*}}.s:[[# @LINE+1]]:30: error: expected linked-to symbol
.section .link,"ao",@progbits
# CHECK: {{.*}}.s:[[# @LINE+1]]:31: error: invalid linked-to symbol
.section .link,"ao",@progbits,123
# CHECK: {{.*}}.s:[[# @LINE+1]]:31: error: linked-to symbol is not in a section: foo
.section .link,"ao",@progbits,foo
# CHECK: {{.*}}.s:[[# @LINE+2]]:31: error: linked-to symbol is not in a section: bar
bar = 42
.section .link,"ao",@progbits,bar
# CHECK: {{.*}}.s:[[# @LINE+2]]:31: error: linked-to symbol is not in a section: baz
.quad baz
.section .link,"ao",@progbits,baz