2011-01-03 23:47:14 +00:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
|
|
|
|
|
|
|
|
.text
|
|
|
|
.globl main
|
|
|
|
.align 16, 0x90
|
|
|
|
.type main,@function
|
|
|
|
main: # @main
|
|
|
|
# BB#0:
|
|
|
|
subl $4, %esp
|
|
|
|
movl $.L.str1, (%esp)
|
|
|
|
calll puts
|
|
|
|
movl $.L.str2, (%esp)
|
|
|
|
calll puts
|
|
|
|
xorl %eax, %eax
|
|
|
|
addl $4, %esp
|
|
|
|
ret
|
|
|
|
.Ltmp0:
|
|
|
|
.size main, .Ltmp0-main
|
|
|
|
|
|
|
|
.type .L.str1,@object # @.str1
|
|
|
|
.section .rodata.str1.1,"aMS",@progbits,1
|
|
|
|
.L.str1:
|
|
|
|
.asciz "Hello"
|
|
|
|
.size .L.str1, 6
|
|
|
|
|
|
|
|
.type .L.str2,@object # @.str2
|
|
|
|
.L.str2:
|
|
|
|
.asciz "World!"
|
|
|
|
.size .L.str2, 7
|
|
|
|
|
|
|
|
.section .note.GNU-stack,"",@progbits
|
|
|
|
|
2011-08-04 17:00:11 +00:00
|
|
|
// CHECK: ('e_indent[EI_CLASS]', 0x01)
|
|
|
|
// CHECK: ('e_indent[EI_DATA]', 0x01)
|
|
|
|
// CHECK: ('e_indent[EI_VERSION]', 0x01)
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: ('_sections', [
|
|
|
|
// CHECK: # Section 0
|
|
|
|
// CHECK: (('sh_name', 0x00000000) # ''
|
|
|
|
|
|
|
|
// CHECK: # '.text'
|
|
|
|
|
|
|
|
// CHECK: # '.rel.text'
|
|
|
|
|
|
|
|
// CHECK: ('_relocations', [
|
2011-08-04 14:01:03 +00:00
|
|
|
// CHECK: # Relocation 0
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: (('r_offset', 0x00000006)
|
2011-08-04 14:39:30 +00:00
|
|
|
// CHECK: ('r_type', 0x01)
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: ),
|
2011-08-04 14:01:03 +00:00
|
|
|
// CHECK: # Relocation 1
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: (('r_offset', 0x0000000b)
|
2011-08-04 14:39:30 +00:00
|
|
|
// CHECK: ('r_type', 0x02)
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: ),
|
2011-08-04 14:01:03 +00:00
|
|
|
// CHECK: # Relocation 2
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: (('r_offset', 0x00000012)
|
2011-08-04 14:39:30 +00:00
|
|
|
// CHECK: ('r_type', 0x01)
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: ),
|
2011-08-04 14:01:03 +00:00
|
|
|
// CHECK: # Relocation 3
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: (('r_offset', 0x00000017)
|
2011-08-04 14:39:30 +00:00
|
|
|
// CHECK: ('r_type', 0x02)
|
2011-01-03 23:47:14 +00:00
|
|
|
// CHECK: ),
|
|
|
|
// CHECK: ])
|
2011-03-20 18:44:20 +00:00
|
|
|
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK: ('st_type', 0x3)
|
2011-03-20 18:44:20 +00:00
|
|
|
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK: ('st_type', 0x3)
|
2011-03-20 18:44:20 +00:00
|
|
|
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK: ('st_bind', 0x0)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK: ('st_type', 0x3)
|
2011-03-20 18:44:20 +00:00
|
|
|
|
|
|
|
// CHECK: # 'main'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x2)
|
2011-03-20 18:44:20 +00:00
|
|
|
|
|
|
|
// CHECK: # 'puts'
|
2011-08-04 15:10:35 +00:00
|
|
|
// CHECK: ('st_bind', 0x1)
|
2011-08-04 15:24:00 +00:00
|
|
|
// CHECK-NEXT: ('st_type', 0x0)
|