Home | History | Annotate | Download | only in llvm-objcopy
      1 # RUN: yaml2obj %s > %t
      2 # RUN: llvm-objcopy --weaken %t %t2
      3 # RUN: llvm-readobj -symbols %t2 | FileCheck %s
      4 
      5 !ELF
      6 FileHeader:
      7   Class:           ELFCLASS64
      8   Data:            ELFDATA2LSB
      9   Type:            ET_REL
     10   Machine:         EM_X86_64
     11 Sections:
     12   - Name:            .text
     13     Type:            SHT_PROGBITS
     14     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     15     Address:         0x1000
     16     AddressAlign:    0x0000000000000010
     17     Size:            64
     18   - Name:            .rel.text
     19     Type:            SHT_REL
     20     Info:            .text
     21     Relocations:
     22       - Offset: 0x1000
     23         Symbol: undefGlobal
     24         Type:   R_X86_64_PC32
     25 Symbols:
     26   Local:
     27     - Name:     Local
     28       Type:     STT_FUNC
     29       Section:  .text
     30       Value:    0x1008
     31       Size:     8
     32   Weak:
     33     - Name:     Weak
     34       Type:     STT_FUNC
     35       Size:     8
     36       Section:  .text
     37       Value:    0x1010
     38   Global:
     39     - Name:     Global
     40       Type:     STT_FUNC
     41       Size:     8
     42       Section:  .text
     43       Value:    0x1018
     44     - Name:     undefGlobal
     45       Type:     STT_FUNC
     46       Size:     8
     47 
     48 #CHECK: Symbols [
     49 #CHECK-NEXT:  Symbol {
     50 #CHECK-NEXT:    Name:
     51 #CHECK-NEXT:    Value: 0x0
     52 #CHECK-NEXT:    Size: 0
     53 #CHECK-NEXT:    Binding: Local
     54 #CHECK-NEXT:    Type: None
     55 #CHECK-NEXT:    Other: 0
     56 #CHECK-NEXT:    Section: Undefined
     57 #CHECK-NEXT:  }
     58 #CHECK-NEXT:  Symbol {
     59 #CHECK-NEXT:    Name: Local
     60 #CHECK-NEXT:    Value: 0x1008
     61 #CHECK-NEXT:    Size: 8
     62 #CHECK-NEXT:    Binding: Local
     63 #CHECK-NEXT:    Type: Function
     64 #CHECK-NEXT:    Other: 0
     65 #CHECK-NEXT:    Section: .text
     66 #CHECK-NEXT:  }
     67 #CHECK-NEXT:  Symbol {
     68 #CHECK-NEXT:    Name: Global
     69 #CHECK-NEXT:    Value: 0x1018
     70 #CHECK-NEXT:    Size: 8
     71 #CHECK-NEXT:    Binding: Weak
     72 #CHECK-NEXT:    Type: Function
     73 #CHECK-NEXT:    Other: 0
     74 #CHECK-NEXT:    Section: .text
     75 #CHECK-NEXT:  }
     76 #CHECK-NEXT:  Symbol {
     77 #CHECK-NEXT:    Name: undefGlobal
     78 #CHECK-NEXT:    Value: 0x0
     79 #CHECK-NEXT:    Size: 8
     80 #CHECK-NEXT:    Binding: Global
     81 #CHECK-NEXT:    Type: Function
     82 #CHECK-NEXT:    Other: 0
     83 #CHECK-NEXT:    Section:
     84 #CHECK-NEXT:  }
     85 #CHECK-NEXT:  Symbol {
     86 #CHECK-NEXT:    Name: Weak
     87 #CHECK-NEXT:    Value: 0x1010
     88 #CHECK-NEXT:    Size: 8
     89 #CHECK-NEXT:    Binding: Weak
     90 #CHECK-NEXT:    Type: Function
     91 #CHECK-NEXT:    Other: 0
     92 #CHECK-NEXT:    Section: .text
     93 #CHECK-NEXT:  }
     94 #CHECK-NEXT:]
     95