[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / llvm-objcopy / ELF / prefix-symbols.test
blobb359e5ea7549659de3d9d8a703f26ff90db4d5e1
1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objcopy --prefix-symbols prefix %t %t2
3 # RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=COMMON --check-prefix=BASIC
4 # RUN: llvm-objcopy --redefine-sym bar=baz --prefix-symbols prefix %t %t3
5 # RUN: llvm-readobj --symbols %t3 | FileCheck %s --check-prefix=COMMON --check-prefix=REDEF
7 !ELF
8 FileHeader:
9   Class:           ELFCLASS64
10   Data:            ELFDATA2LSB
11   Type:            ET_REL
12   Machine:         EM_X86_64
13 Sections:
14   - Name:            .text
15     Type:            SHT_PROGBITS
16     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
17     Address:         0x1000
18     AddressAlign:    0x0000000000000010
19     Size:            64
20 Symbols:
21   - Name:     foo
22     Type:     STT_SECTION
23     Section:  .text
24   - Name:     bar
25     Type:     STT_FILE
26     Section:  .text
27   - Name:     foobar
28     Type:     STT_FUNC
29     Section:  .text
30     Binding:  STB_GLOBAL
32 # COMMON: Symbols [
33 # COMMON-NEXT:  Symbol {
34 # COMMON-NEXT:    Name:
35 # COMMON-NEXT:    Value: 0x0
36 # COMMON-NEXT:    Size: 0
37 # COMMON-NEXT:    Binding: Local
38 # COMMON-NEXT:    Type: None
39 # COMMON-NEXT:    Other: 0
40 # COMMON-NEXT:    Section: Undefined
41 # COMMON-NEXT:  }
42 # COMMON-NEXT:  Symbol {
43 # COMMON-NEXT:    Name: foo
44 # COMMON-NEXT:    Value: 0x0
45 # COMMON-NEXT:    Size: 0
46 # COMMON-NEXT:    Binding: Local
47 # COMMON-NEXT:    Type: Section
48 # COMMON-NEXT:    Other: 0
49 # COMMON-NEXT:    Section: .text
50 # COMMON-NEXT:  }
51 # COMMON-NEXT:  Symbol {
52 # BASIC-NEXT:    Name: prefixbar
53 # REDEF-NEXT:    Name: prefixbaz
54 # COMMON-NEXT:    Value: 0x0
55 # COMMON-NEXT:    Size: 0
56 # COMMON-NEXT:    Binding: Local
57 # COMMON-NEXT:    Type: File
58 # COMMON-NEXT:    Other: 0
59 # COMMON-NEXT:    Section: .text
60 # COMMON-NEXT:  }
61 # COMMON-NEXT:  Symbol {
62 # COMMON-NEXT:    Name: prefixfoobar
63 # COMMON-NEXT:    Value: 0x0
64 # COMMON-NEXT:    Size: 0
65 # COMMON-NEXT:    Binding: Global
66 # COMMON-NEXT:    Type: Function
67 # COMMON-NEXT:    Other: 0
68 # COMMON-NEXT:    Section: .text
69 # COMMON-NEXT:  }
70 # COMMON-NEXT:]