summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/gnu-notes.test
blob: ab7dcdeee90fe1a69960ed27b3d9ede20ede36ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# RUN: yaml2obj %s > %t.so
# RUN: llvm-readobj -elf-output-style GNU --notes %t.so | FileCheck %s --check-prefix=GNU
# RUN: llvm-readobj -elf-output-style LLVM --notes %t.so | FileCheck %s --check-prefix=LLVM

# GNU:      Displaying notes found at file offset 0x00000340 with length 0x00000020:
# GNU-NEXT:   Owner                 Data size       Description
# GNU-NEXT:   GNU                   0x00000010      NT_GNU_ABI_TAG (ABI version tag)
# GNU-NEXT:     OS: Linux, ABI: 2.6.32

# GNU:      Displaying notes found at file offset 0x00000360 with length 0x00000020:
# GNU-NEXT:   Owner                 Data size       Description
# GNU-NEXT:   GNU                  0x00000010       NT_GNU_BUILD_ID (unique build ID bitstring)
# GNU-NEXT:     Build ID: 4fcb712aa6387724a9f465a32cd8c14b

# GNU:      Displaying notes found at file offset 0x000003cc with length 0x0000001c:
# GNU-NEXT:   Owner                 Data size       Description
# GNU-NEXT:   GNU                  0x00000009       NT_GNU_GOLD_VERSION (gold version)
# GNU-NEXT:     Version: gold 1.11

# LLVM:      Notes [
# LLVM-NEXT:   NoteSection {
# LLVM-NEXT:     Offset: 0x340
# LLVM-NEXT:     Size: 0x20
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: GNU
# LLVM-NEXT:       Data size: 0x10
# LLVM-NEXT:       Type: NT_GNU_ABI_TAG (ABI version tag)
# LLVM-NEXT:       OS: Linux
# LLVM-NEXT:       ABI: 2.6.32
# LLVM-NEXT:     }
# LLVM-NEXT:   }
# LLVM-NEXT:   NoteSection {
# LLVM-NEXT:     Offset: 0x360
# LLVM-NEXT:     Size: 0x20
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: GNU
# LLVM-NEXT:       Data size: 0x10
# LLVM-NEXT:       Type: NT_GNU_BUILD_ID (unique build ID bitstring)
# LLVM-NEXT:       Build ID: 4fcb712aa6387724a9f465a32cd8c14b
# LLVM-NEXT:     }
# LLVM-NEXT:   }
# LLVM-NEXT:   NoteSection {
# LLVM-NEXT:     Offset: 0x3CC
# LLVM-NEXT:     Size: 0x1C
# LLVM-NEXT:     Note {
# LLVM-NEXT:       Owner: GNU
# LLVM-NEXT:       Data size: 0x9
# LLVM-NEXT:       Type: NT_GNU_GOLD_VERSION (gold version)
# LLVM-NEXT:       Version: gold 1.11
# LLVM-NEXT:     }
# LLVM-NEXT:   }
# LLVM-NEXT: ]

--- !ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_EXEC
  Machine:         EM_X86_64
Sections:
  - Name:            .note.ABI-tag
    Type:            SHT_NOTE
    AddressAlign:    0x0000000000000004
    Content:         040000001000000001000000474E550000000000020000000600000020000000
  - Name:            .note.gnu.build-id
    Type:            SHT_NOTE
    Flags:           [ SHF_ALLOC ]
    Address:         0x0000000000400120
    AddressAlign:    0x0000000000000004
    Content:         040000001000000003000000474E55004FCB712AA6387724A9F465A32CD8C14B
  - Name:            .text
    Type:            SHT_PROGBITS
    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    Address:         0x0000000000400140
    AddressAlign:    0x0000000000000001
    Content:         31C0C3
  - Name:            .eh_frame
    Type:            SHT_PROGBITS
    Flags:           [ SHF_ALLOC ]
    Address:         0x0000000000400148
    AddressAlign:    0x0000000000000008
    Content:         1400000000000000017A5200017810011B0C070890010000140000001C000000D8FFFFFF030000000000000000000000
  - Name:            .data
    Type:            SHT_PROGBITS
    Flags:           [ SHF_WRITE, SHF_ALLOC ]
    Address:         0x0000000000401000
    AddressAlign:    0x0000000000000001
    Content:         ''
  - Name:            .bss
    Type:            SHT_NOBITS
    Flags:           [ SHF_WRITE, SHF_ALLOC ]
    Address:         0x0000000000401000
    AddressAlign:    0x0000000000000001
  - Name:            .comment
    Type:            SHT_PROGBITS
    Flags:           [ SHF_MERGE, SHF_STRINGS ]
    AddressAlign:    0x0000000000000001
    Content:         004743433A2028474E552920352E342E3000
  - Name:            .note.gnu.gold-version
    Type:            SHT_NOTE
    AddressAlign:    0x0000000000000004
    Content:         040000000900000004000000474E5500676F6C6420312E3131000000
Symbols:
  - Name:            reduced.c
    Type:            STT_FILE
  - Type:            STT_FILE
  - Name:            main
    Type:            STT_FUNC
    Section:         .text
    Value:           0x0000000000400140
    Size:            0x0000000000000003
    Binding: STB_GLOBAL
  - Name:            _edata
    Value:           0x0000000000401000
    Binding: STB_GLOBAL
  - Name:            __bss_start
    Value:           0x0000000000401000
    Binding: STB_GLOBAL
  - Name:            _end
    Value:           0x0000000000401000
    Binding: STB_GLOBAL
...
OpenPOWER on IntegriCloud