llvm-project/lld/test/ELF/section-metadata-err.s
Rafael Espindola b47c6e5cbd Fix a crash.
We would crash if a SHF_LINK_ORDER section pointed to a non
InputSection section. Since those sections are not merged in order,
SHF_LINK_ORDER is pretty meaningless and we can error on that case.

llvm-svn: 304327
2017-05-31 19:09:52 +00:00

16 lines
365 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: not ld.lld %t.o -o %t 2>&1 | FileCheck %s
# CHECK: error: Merge and .eh_frame sections are not supported with SHF_LINK_ORDER {{.*}}section-metadata-err.s.tmp.o:(.foo)
.global _start
_start:
.quad .foo
.section .foo,"aM",@progbits,8
.quad 0
.section bar,"ao",@progbits,.foo