Home | History | Annotate | Download | only in llvm-objcopy
      1 # RUN: yaml2obj %s > %t
      2 # RUN: llvm-objcopy %t %t2
      3 # RUN: llvm-readobj -sections %t2 | FileCheck %s
      4 
      5 !ELF
      6 FileHeader:
      7   Class:           ELFCLASS64
      8   Data:            ELFDATA2LSB
      9   Type:            ET_EXEC
     10   Machine:         EM_X86_64
     11 Sections:
     12   - Name:            .text
     13     Type:            SHT_PROGBITS
     14     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     15     Address:         0x0
     16     AddressAlign:    0x0000000000001000
     17     Content:         "00000000"
     18   - Name:            .empty
     19     Type:            SHT_PROGBITS
     20     Flags:           [ SHF_ALLOC ]
     21     Address:         0x1000
     22     AddressAlign:    0x0000000000001000
     23     Content:         ""
     24   - Name:            .data
     25     Type:            SHT_PROGBITS
     26     Flags:           [ SHF_ALLOC ]
     27     Address:         0x1000
     28     AddressAlign:    0x0000000000001000
     29     Content:         "00000000"
     30 
     31 
     32 # CHECK:      Name: .text
     33 # CHECK-NEXT: Type: SHT_PROGBITS
     34 # CHECK-NEXT: Flags [
     35 # CHECK-NEXT:   SHF_ALLOC
     36 # CHECK-NEXT:   SHF_EXECINSTR
     37 # CHECK-NEXT: ]
     38 
     39 # CHECK:      Name: .empty
     40 # CHECK-NEXT: Type: SHT_PROGBITS
     41 # CHECK-NEXT: Flags [
     42 # CHECK-NEXT:   SHF_ALLOC
     43 # CHECK-NEXT: ]
     44 # CHECK-NEXT: Address: 0x1000
     45 # CHECK-NEXT: Offset: 0x2000
     46 # CHECK-NEXT: Size: 0
     47 
     48 # CHECK:      Name: .data
     49 # CHECK-NEXT: Type: SHT_PROGBITS
     50 # CHECK-NEXT: Flags [
     51 # CHECK-NEXT:   SHF_ALLOC
     52 # CHECK-NEXT: ]
     53 # CHECK-NEXT: Address: 0x1000
     54 # CHECK-NEXT: Offset: 0x2000
     55 # CHECK-NEXT: Size: 4
     56