brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f7ff635 Raw
32 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t1.o3# RUN: echo '.section .text.foo,"axG",@progbits,foo,comdat; .globl foo; foo:' |\4# RUN:   llvm-mc -filetype=obj -triple=x86_64 - -o %t2.o5# RUN: echo '.weak foo; foo: .section .text.foo,"axG",@progbits,foo,comdat; .globl bar; bar:' |\6# RUN:   llvm-mc -filetype=obj -triple=x86_64 - -o %t3.o7 8# RUN: not ld.lld --threads=1 %t2.o %t3.o %t1.o -o /dev/null 2>&1 | FileCheck %s9 10# CHECK:      error: relocation refers to a symbol in a discarded section: bar11# CHECK-NEXT: >>> defined in {{.*}}3.o12# CHECK-NEXT: >>> section group signature: foo13# CHECK-NEXT: >>> prevailing definition is in {{.*}}2.o14# CHECK-NEXT: >>> or the symbol in the prevailing group {{.*}}15# CHECK-NEXT: >>> referenced by {{.*}}1.o:(.text+0x1)16 17# CHECK:      error: relocation refers to a discarded section: .text.foo18# CHECK-NEXT: >>> defined in {{.*}}1.o19# CHECK-NEXT: >>> section group signature: foo20# CHECK-NEXT: >>> prevailing definition is in {{.*}}2.o21# CHECK-NEXT: >>> referenced by {{.*}}1.o:(.data+0x0)22 23.globl _start24_start:25  jmp bar26 27.section .text.foo,"axG",@progbits,foo,comdat28.globl foo29foo:30.data31  .quad .text.foo32