Home | History | Annotate | Download | only in llvm-objcopy
      1 # RUN: yaml2obj %s > %t
      2 # RUN: llvm-objcopy -R .test2 -R .test3 -R .test5 %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:            .test1
     13     Type:            SHT_PROGBITS
     14     Flags:           [ ]
     15   - Name:            .test2
     16     Type:            SHT_PROGBITS
     17     Flags:           [ ]
     18   - Name:            .test3
     19     Type:            SHT_PROGBITS
     20     Flags:           [ ]
     21   - Name:            .test4
     22     Type:            SHT_PROGBITS
     23     Flags:           [ ]
     24   - Name:            .test5
     25     Type:            SHT_PROGBITS
     26     Flags:           [ ]
     27   - Name:            .test6
     28     Type:            SHT_PROGBITS
     29     Flags:           [ ]
     30 
     31 # CHECK: Sections [
     32 # CHECK:   Section {
     33 # CHECK:     Index: 0
     34 # CHECK:     Name:  (0)
     35 # CHECK:     Type: SHT_NULL (0x0)
     36 # CHECK:     Flags [ (0x0)
     37 # CHECK:     ]
     38 # CHECK:     Address: 0x0
     39 # CHECK:     Offset:
     40 # CHECK:     Size:
     41 # CHECK:     Link: 0
     42 # CHECK:     Info: 0
     43 # CHECK:     AddressAlignment: 0
     44 # CHECK:     EntrySize: 0
     45 # CHECK:   }
     46 # CHECK:   Section {
     47 # CHECK:     Index: 1
     48 # CHECK:     Name: .test1
     49 # CHECK:     Type: SHT_PROGBITS (0x1)
     50 # CHECK:     Flags [ (0x0)
     51 # CHECK:     ]
     52 # CHECK:     Address: 0x0
     53 # CHECK:     Offset:
     54 # CHECK:     Size:
     55 # CHECK:     Link: 0
     56 # CHECK:     Info: 0
     57 # CHECK:     AddressAlignment: 0
     58 # CHECK:     EntrySize: 0
     59 # CHECK:   }
     60 # CHECK:   Section {
     61 # CHECK:     Index: 2
     62 # CHECK:     Name: .test4
     63 # CHECK:     Type: SHT_PROGBITS (0x1)
     64 # CHECK:     Flags [ (0x0)
     65 # CHECK:     ]
     66 # CHECK:     Address: 0x0
     67 # CHECK:     Offset:
     68 # CHECK:     Size:
     69 # CHECK:     Link: 0
     70 # CHECK:     Info: 0
     71 # CHECK:     AddressAlignment: 0
     72 # CHECK:     EntrySize: 0
     73 # CHECK:   }
     74 # CHECK:   Section {
     75 # CHECK:     Index: 3
     76 # CHECK:     Name: .test6
     77 # CHECK:     Type: SHT_PROGBITS (0x1)
     78 # CHECK:     Flags [ (0x0)
     79 # CHECK:     ]
     80 # CHECK:     Address: 0x0
     81 # CHECK:     Offset:
     82 # CHECK:     Size:
     83 # CHECK:     Link: 0
     84 # CHECK:     Info: 0
     85 # CHECK:     AddressAlignment: 0
     86 # CHECK:     EntrySize: 0
     87 # CHECK:   }
     88 # CHECK:   Section {
     89 # CHECK:     Index: 4
     90 # CHECK:     Name: .symtab
     91 # CHECK:     Type: SHT_SYMTAB (0x2)
     92 # CHECK:     Flags [ (0x0)
     93 # CHECK:     ]
     94 # CHECK:     Address: 0x0
     95 # CHECK:     Offset:
     96 # CHECK:     Size:
     97 # CHECK:     Link: 5
     98 # CHECK:     Info: 1
     99 # CHECK:     AddressAlignment: 8
    100 # CHECK:     EntrySize: 24
    101 # CHECK:   }
    102 # CHECK:   Section {
    103 # CHECK:     Index: 5
    104 # CHECK:     Name: .strtab
    105 # CHECK:     Type: SHT_STRTAB (0x3)
    106 # CHECK:     Flags [ (0x0)
    107 # CHECK:     ]
    108 # CHECK:     Address: 0x0
    109 # CHECK:     Offset:
    110 # CHECK:     Size:
    111 # CHECK:     Link: 0
    112 # CHECK:     Info: 0
    113 # CHECK:     AddressAlignment: 1
    114 # CHECK:     EntrySize: 0
    115 # CHECK:   }
    116 # CHECK:   Section {
    117 # CHECK:     Index: 6
    118 # CHECK:     Name: .shstrtab
    119 # CHECK:     Type: SHT_STRTAB (0x3)
    120 # CHECK:     Flags [ (0x0)
    121 # CHECK:     ]
    122 # CHECK:     Address: 0x0
    123 # CHECK:     Offset:
    124 # CHECK:     Size:
    125 # CHECK:     Link: 0
    126 # CHECK:     Info: 0
    127 # CHECK:     AddressAlignment: 1
    128 # CHECK:     EntrySize: 0
    129 # CHECK:   }
    130 # CHECK: ]
    131