]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/comdat-discarded-reloc.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / comdat-discarded-reloc.s
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/comdat-discarded-reloc.s -o %t2.o
4 # RUN: ld.lld -gc-sections %t.o %t2.o -o %t
5
6 ## ELF spec doesn't allow a relocation to point to a deduplicated
7 ## COMDAT section. Unfortunately this happens in practice (e.g. .eh_frame)
8 ## Test case checks we do not crash.
9
10 .global bar, _start
11
12 .section .text.foo,"aG",@progbits,group,comdat
13
14 .section .text
15 _start:
16  .quad .text.foo
17  .quad bar