section.s revision 2ff9e83a826c1c2ee0f1c6072d3d97d5b10678ee
1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump | FileCheck %s 2 3// Test that these names are accepted. 4 5.section .note.GNU-stack,"",@progbits 6.section .note.GNU-,"",@progbits 7.section -.note.GNU,"",@progbits 8 9// CHECK: ('sh_name', 0x00000012) # '.note.GNU-stack' 10// CHECK: ('sh_name', 0x00000022) # '.note.GNU-' 11// CHECK: ('sh_name', 0x0000002d) # '-.note.GNU' 12 13// Test that the dafults are used 14 15.section .init 16.section .fini 17.section .rodata 18 19// CHECK: (('sh_name', 0x00000038) # '.init' 20// CHECK-NEXT: ('sh_type', 0x00000001) 21// CHECK-NEXT: ('sh_flags', 0x00000006) 22// CHECK-NEXT: ('sh_addr', 0x00000000) 23// CHECK-NEXT: ('sh_offset', 0x00000050) 24// CHECK-NEXT: ('sh_size', 0x00000000) 25// CHECK-NEXT: ('sh_link', 0x00000000) 26// CHECK-NEXT: ('sh_info', 0x00000000) 27// CHECK-NEXT: ('sh_addralign', 0x00000001) 28// CHECK-NEXT: ('sh_entsize', 0x00000000) 29// CHECK-NEXT: ), 30// CHECK-NEXT: # Section 0x0000000a 31// CHECK-NEXT: (('sh_name', 0x0000003e) # '.fini' 32// CHECK-NEXT: ('sh_type', 0x00000001) 33// CHECK-NEXT: ('sh_flags', 0x00000006) 34// CHECK-NEXT: ('sh_addr', 0x00000000) 35// CHECK-NEXT: ('sh_offset', 0x00000050) 36// CHECK-NEXT: ('sh_size', 0x00000000) 37// CHECK-NEXT: ('sh_link', 0x00000000) 38// CHECK-NEXT: ('sh_info', 0x00000000) 39// CHECK-NEXT: ('sh_addralign', 0x00000001) 40// CHECK-NEXT: ('sh_entsize', 0x00000000) 41// CHECK-NEXT: ), 42// CHECK-NEXT: # Section 0x0000000b 43// CHECK-NEXT: (('sh_name', 0x00000044) # '.rodata' 44// CHECK-NEXT: ('sh_type', 0x00000001) 45// CHECK-NEXT: ('sh_flags', 0x00000002) 46// CHECK-NEXT: ('sh_addr', 0x00000000) 47// CHECK-NEXT: ('sh_offset', 0x00000050) 48// CHECK-NEXT: ('sh_size', 0x00000000) 49// CHECK-NEXT: ('sh_link', 0x00000000) 50// CHECK-NEXT: ('sh_info', 0x00000000) 51// CHECK-NEXT: ('sh_addralign', 0x00000001) 52// CHECK-NEXT: ('sh_entsize', 0x00000000) 53// CHECK-NEXT: ), 54 55// Test that we can parse these 56foo: 57bar: 58.section .text.foo,"axG",@progbits,foo,comdat 59.section .text.bar,"axMG",@progbits,42,bar,comdat 60