69 lines · plain
1// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -h -S -r --symbols - | FileCheck %s2 3 .text4 .globl main5 .align 16, 0x906 .type main,@function7main: # @main8# %bb.0:9 subl $4, %esp10 movl $.L.str1, (%esp)11 calll puts12 movl $.L.str2, (%esp)13 calll puts14 xorl %eax, %eax15 addl $4, %esp16 ret17.Ltmp0:18 .size main, .Ltmp0-main19 20 .type .L.str1,@object # @.str121 .section .rodata.str1.1,"aMS",@progbits,122.L.str1:23 .asciz "Hello"24 .size .L.str1, 625 26 .type .L.str2,@object # @.str227.L.str2:28 .asciz "World!"29 .size .L.str2, 730 31 .section .note.GNU-stack,"",@progbits32 33// CHECK: ElfHeader {34// CHECK: Class: 32-bit35// CHECK: DataEncoding: LittleEndian36// CHECK: FileVersion: 137// CHECK: }38// CHECK: Sections [39// CHECK: Section {40// CHECK: Index: 041// CHECK: Name: (0)42 43// CHECK: Name: .text44 45// CHECK: Name: .rel.text46 47// CHECK: Relocations [48// CHECK: Section {{.*}} .rel.text {49// CHECK: 0x6 R_386_32 .rodata.str1.150// CHECK: 0xB R_386_PC32 puts51// CHECK: 0x12 R_386_32 .rodata.str1.152// CHECK: 0x17 R_386_PC32 puts53// CHECK: }54// CHECK: ]55 56// CHECK: Symbols [57 58// CHECK: Symbol {59// CHECK: Name: main60// CHECK: Binding: Global61// CHECK: Type: Function62// CHECK: }63 64// CHECK: Symbol {65// CHECK: Name: puts66// CHECK: Binding: Global67// CHECK: Type: None68// CHECK: }69