41 lines · plain
1# RUN: llvm-mc -filetype=obj -triple x86_64 %s -o %t2# RUN: llvm-readelf -SrsX %t | FileCheck %s3 4## Test that we can forward reference a section.5 6mov .rodata, %rsi7mov data, %rsi8mov .debug_info, %rsi9mov .debug_abbrev, %rsi10 11.section .rodata,"a"12.pushsection data, 2; .long 2; .popsection13.section data; .long 114.section .debug_info,"G",@progbits,11,comdat; .long x115.section .debug_info,"G",@progbits,22,comdat; .long x216.section .debug_info,"",@progbits; .long x017 18.text19mov data, %rdi20 21# CHECK: Relocation section '.rela.text'22# CHECK: R_X86_64_32S {{.*}} data + 023# CHECK: R_X86_64_32S {{.*}} data + 024 25# CHECK: Relocation section '.rela.debug_info' at offset {{.*}} contains 126# CHECK: Relocation section '.rela.debug_info' at offset {{.*}} contains 127# CHECK: Relocation section '.rela.debug_info' at offset {{.*}} contains 128 29# CHECK: Symbol table '.symtab' contains 10 entries:30# CHECK-NEXT: Num:31# CHECK-NEXT: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND32# CHECK-NEXT: 0000000000000000 0 SECTION LOCAL DEFAULT [[#]] (.rodata) .rodata33# CHECK-NEXT: 0000000000000000 0 SECTION LOCAL DEFAULT [[#]] (data) data34# CHECK-NEXT: 0000000000000000 0 SECTION LOCAL DEFAULT [[#]] (.debug_info) .debug_info35# CHECK-NEXT: 0000000000000000 0 NOTYPE LOCAL DEFAULT [[#]] (.group) 1136# CHECK-NEXT: 0000000000000000 0 NOTYPE LOCAL DEFAULT [[#]] (.group) 2237# CHECK-NEXT: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .debug_abbrev38# CHECK-NEXT: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND x139# CHECK-NEXT: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND x240# CHECK-NEXT: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND x041