Fixed some bugs.
[llvm/zpu.git] / test / MC / ELF / entsize.s
blobe8eb62eb2ea575ae1847d72c31c249efaf0b4735
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
3 // Test that mergeable constants have sh_entsize set.
5 // 1 byte strings
6 .section .rodata.str1.1,"aMS",@progbits,1
8 .type .L.str1,@object # @.str1
9 .L.str1:
10 .asciz "tring"
11 .size .L.str1, 6
13 .type .L.str2,@object # @.str2
14 .L.str2:
15 .asciz "String"
16 .size .L.str2, 7
18 // 2 byte strings
19 .section .rodata.str2.1,"aMS",@progbits,2
20 .type .L.str3,@object # @.str3
21 .L.str3:
22 .asciz "L\000o\000n\000g\000"
23 .size .L.str3, 9
25 .type .L.str4,@object # @.str4
26 .L.str4:
27 .asciz "o\000n\000g\000"
28 .size .L.str4, 7
30 // 8 byte constants
31 .section .rodata.cst8,"aM",@progbits,8
32 .quad 42
33 .quad 42
35 // CHECK: # Section 0x00000004
36 // CHECK-NEXT: ('sh_name', 0x00000012) # '.rodata.str1.1'
37 // CHECK-NEXT: ('sh_type', 0x00000001)
38 // CHECK-NEXT: ('sh_flags', 0x00000032)
39 // CHECK-NEXT: ('sh_addr',
40 // CHECK-NEXT: ('sh_offset',
41 // CHECK-NEXT: ('sh_size', 0x0000000d)
42 // CHECK-NEXT: ('sh_link',
43 // CHECK-NEXT: ('sh_info',
44 // CHECK-NEXT: ('sh_addralign', 0x00000001)
45 // CHECK-NEXT: ('sh_entsize', 0x00000001)
47 // CHECK: # Section 0x00000005
48 // CHECK-NEXT: ('sh_name', 0x00000021) # '.rodata.str2.1'
49 // CHECK-NEXT: ('sh_type', 0x00000001)
50 // CHECK-NEXT: ('sh_flags', 0x00000032)
51 // CHECK-NEXT: ('sh_addr',
52 // CHECK-NEXT: ('sh_offset',
53 // CHECK-NEXT: ('sh_size', 0x00000010)
54 // CHECK-NEXT: ('sh_link',
55 // CHECK-NEXT: ('sh_info',
56 // CHECK-NEXT: ('sh_addralign', 0x00000001)
57 // CHECK-NEXT: ('sh_entsize', 0x00000002)
59 // CHECK: # Section 0x00000006
60 // CHECK-NEXT: ('sh_name', 0x00000030) # '.rodata.cst8
61 // CHECK-NEXT: ('sh_type', 0x00000001)
62 // CHECK-NEXT: ('sh_flags', 0x00000012)
63 // CHECK-NEXT: ('sh_addr',
64 // CHECK-NEXT: ('sh_offset',
65 // CHECK-NEXT: ('sh_size', 0x00000010)
66 // CHECK-NEXT: ('sh_link',
67 // CHECK-NEXT: ('sh_info',
68 // CHECK-NEXT: ('sh_addralign', 0x00000001)
69 // CHECK-NEXT: ('sh_entsize', 0x00000008)