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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
|
## Test that llvm-readobj/llvm-readelf shows proper relocation type
## names and values for i386 target.
# RUN: yaml2obj %s -o %t-i386.o
# RUN: llvm-readobj -r --expand-relocs %t-i386.o | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf -r --expand-relocs %t-i386.o | FileCheck %s --check-prefix=GNU
# LLVM: Type: R_386_NONE (0)
# LLVM: Type: R_386_32 (1)
# LLVM: Type: R_386_PC32 (2)
# LLVM: Type: R_386_GOT32 (3)
# LLVM: Type: R_386_PLT32 (4)
# LLVM: Type: R_386_COPY (5)
# LLVM: Type: R_386_GLOB_DAT (6)
# LLVM: Type: R_386_JUMP_SLOT (7)
# LLVM: Type: R_386_RELATIVE (8)
# LLVM: Type: R_386_GOTOFF (9)
# LLVM: Type: R_386_GOTPC (10)
# LLVM: Type: R_386_32PLT (11)
# LLVM: Type: R_386_TLS_TPOFF (14)
# LLVM: Type: R_386_TLS_IE (15)
# LLVM: Type: R_386_TLS_GOTIE (16)
# LLVM: Type: R_386_TLS_LE (17)
# LLVM: Type: R_386_TLS_GD (18)
# LLVM: Type: R_386_TLS_LDM (19)
# LLVM: Type: R_386_16 (20)
# LLVM: Type: R_386_PC16 (21)
# LLVM: Type: R_386_8 (22)
# LLVM: Type: R_386_PC8 (23)
# LLVM: Type: R_386_TLS_GD_32 (24)
# LLVM: Type: R_386_TLS_GD_PUSH (25)
# LLVM: Type: R_386_TLS_GD_CALL (26)
# LLVM: Type: R_386_TLS_GD_POP (27)
# LLVM: Type: R_386_TLS_LDM_32 (28)
# LLVM: Type: R_386_TLS_LDM_PUSH (29)
# LLVM: Type: R_386_TLS_LDM_CALL (30)
# LLVM: Type: R_386_TLS_LDM_POP (31)
# LLVM: Type: R_386_TLS_LDO_32 (32)
# LLVM: Type: R_386_TLS_IE_32 (33)
# LLVM: Type: R_386_TLS_LE_32 (34)
# LLVM: Type: R_386_TLS_DTPMOD32 (35)
# LLVM: Type: R_386_TLS_DTPOFF32 (36)
# LLVM: Type: R_386_TLS_TPOFF32 (37)
# LLVM: Type: R_386_TLS_GOTDESC (39)
# LLVM: Type: R_386_TLS_DESC_CALL (40)
# LLVM: Type: R_386_TLS_DESC (41)
# LLVM: Type: R_386_IRELATIVE (42)
# LLVM: Type: R_386_GOT32X (43)
# GNU: Relocation section '.rel.text' at offset 0x128 contains 41 entries:
# GNU-NEXT: Offset Info Type Sym. Value Symbol's Name
# GNU-NEXT: 00000002 00000100 R_386_NONE 00000000 foo
# GNU-NEXT: 00000008 00000101 R_386_32 00000000 foo
# GNU-NEXT: 0000000e 00000102 R_386_PC32 00000000 foo
# GNU-NEXT: 00000014 00000103 R_386_GOT32 00000000 foo
# GNU-NEXT: 0000001a 00000104 R_386_PLT32 00000000 foo
# GNU-NEXT: 00000020 00000105 R_386_COPY 00000000 foo
# GNU-NEXT: 00000026 00000106 R_386_GLOB_DAT 00000000 foo
# GNU-NEXT: 0000002c 00000107 R_386_JUMP_SLOT 00000000 foo
# GNU-NEXT: 00000032 00000108 R_386_RELATIVE 00000000 foo
# GNU-NEXT: 00000038 00000109 R_386_GOTOFF 00000000 foo
# GNU-NEXT: 0000003e 0000010a R_386_GOTPC 00000000 foo
# GNU-NEXT: 00000044 0000010b R_386_32PLT 00000000 foo
# GNU-NEXT: 0000004a 0000010e R_386_TLS_TPOFF 00000000 foo
# GNU-NEXT: 00000050 0000010f R_386_TLS_IE 00000000 foo
# GNU-NEXT: 00000056 00000110 R_386_TLS_GOTIE 00000000 foo
# GNU-NEXT: 0000005c 00000111 R_386_TLS_LE 00000000 foo
# GNU-NEXT: 00000062 00000112 R_386_TLS_GD 00000000 foo
# GNU-NEXT: 00000068 00000113 R_386_TLS_LDM 00000000 foo
# GNU-NEXT: 0000006e 00000114 R_386_16 00000000 foo
# GNU-NEXT: 00000074 00000115 R_386_PC16 00000000 foo
# GNU-NEXT: 0000007a 00000116 R_386_8 00000000 foo
# GNU-NEXT: 00000080 00000117 R_386_PC8 00000000 foo
# GNU-NEXT: 00000086 00000118 R_386_TLS_GD_32 00000000 foo
# GNU-NEXT: 0000008c 00000119 R_386_TLS_GD_PUSH 00000000 foo
# GNU-NEXT: 00000092 0000011a R_386_TLS_GD_CALL 00000000 foo
# GNU-NEXT: 00000098 0000011b R_386_TLS_GD_POP 00000000 foo
# GNU-NEXT: 0000009e 0000011c R_386_TLS_LDM_32 00000000 foo
# GNU-NEXT: 000000a4 0000011d R_386_TLS_LDM_PUSH 00000000 foo
# GNU-NEXT: 000000aa 0000011e R_386_TLS_LDM_CALL 00000000 foo
# GNU-NEXT: 000000b0 0000011f R_386_TLS_LDM_POP 00000000 foo
# GNU-NEXT: 000000b6 00000120 R_386_TLS_LDO_32 00000000 foo
# GNU-NEXT: 000000bc 00000121 R_386_TLS_IE_32 00000000 foo
# GNU-NEXT: 000000c2 00000122 R_386_TLS_LE_32 00000000 foo
# GNU-NEXT: 000000c8 00000123 R_386_TLS_DTPMOD32 00000000 foo
# GNU-NEXT: 000000ce 00000124 R_386_TLS_DTPOFF32 00000000 foo
# GNU-NEXT: 000000d4 00000125 R_386_TLS_TPOFF32 00000000 foo
# GNU-NEXT: 000000da 00000127 R_386_TLS_GOTDESC 00000000 foo
# GNU-NEXT: 000000e0 00000128 R_386_TLS_DESC_CALL 00000000 foo
# GNU-NEXT: 000000e6 00000129 R_386_TLS_DESC 00000000 foo
# GNU-NEXT: 000000ec 0000012a R_386_IRELATIVE 00000000 foo
# GNU-NEXT: 000000f2 0000012b R_386_GOT32X 00000000 foo
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
OSABI: ELFOSABI_GNU
Type: ET_REL
Machine: EM_386
Sections:
- Name: .text
Type: SHT_PROGBITS
Content: 00
- Name: .rel.text
Type: SHT_REL
Link: .symtab
AddressAlign: 0x0000000000000004
EntSize: 0x0000000000000008
Info: .text
Relocations:
- Offset: 0x0000000000000002
Type: R_386_NONE
Symbol: foo
- Offset: 0x0000000000000008
Type: R_386_32
Symbol: foo
- Offset: 0x000000000000000E
Type: R_386_PC32
Symbol: foo
- Offset: 0x0000000000000014
Type: R_386_GOT32
Symbol: foo
- Offset: 0x000000000000001A
Type: R_386_PLT32
Symbol: foo
- Offset: 0x0000000000000020
Type: R_386_COPY
Symbol: foo
- Offset: 0x0000000000000026
Type: R_386_GLOB_DAT
Symbol: foo
- Offset: 0x000000000000002C
Type: R_386_JUMP_SLOT
Symbol: foo
- Offset: 0x0000000000000032
Type: R_386_RELATIVE
Symbol: foo
- Offset: 0x0000000000000038
Type: R_386_GOTOFF
Symbol: foo
- Offset: 0x000000000000003E
Type: R_386_GOTPC
Symbol: foo
- Offset: 0x0000000000000044
Type: R_386_32PLT
Symbol: foo
- Offset: 0x000000000000004A
Type: R_386_TLS_TPOFF
Symbol: foo
- Offset: 0x0000000000000050
Type: R_386_TLS_IE
Symbol: foo
- Offset: 0x0000000000000056
Type: R_386_TLS_GOTIE
Symbol: foo
- Offset: 0x000000000000005C
Type: R_386_TLS_LE
Symbol: foo
- Offset: 0x0000000000000062
Type: R_386_TLS_GD
Symbol: foo
- Offset: 0x0000000000000068
Type: R_386_TLS_LDM
Symbol: foo
- Offset: 0x000000000000006E
Type: R_386_16
Symbol: foo
- Offset: 0x0000000000000074
Type: R_386_PC16
Symbol: foo
- Offset: 0x000000000000007A
Type: R_386_8
Symbol: foo
- Offset: 0x0000000000000080
Type: R_386_PC8
Symbol: foo
- Offset: 0x0000000000000086
Type: R_386_TLS_GD_32
Symbol: foo
- Offset: 0x000000000000008C
Type: R_386_TLS_GD_PUSH
Symbol: foo
- Offset: 0x0000000000000092
Type: R_386_TLS_GD_CALL
Symbol: foo
- Offset: 0x0000000000000098
Type: R_386_TLS_GD_POP
Symbol: foo
- Offset: 0x000000000000009E
Type: R_386_TLS_LDM_32
Symbol: foo
- Offset: 0x00000000000000A4
Type: R_386_TLS_LDM_PUSH
Symbol: foo
- Offset: 0x00000000000000AA
Type: R_386_TLS_LDM_CALL
Symbol: foo
- Offset: 0x00000000000000B0
Type: R_386_TLS_LDM_POP
Symbol: foo
- Offset: 0x00000000000000B6
Type: R_386_TLS_LDO_32
Symbol: foo
- Offset: 0x00000000000000BC
Type: R_386_TLS_IE_32
Symbol: foo
- Offset: 0x00000000000000C2
Type: R_386_TLS_LE_32
Symbol: foo
- Offset: 0x00000000000000C8
Type: R_386_TLS_DTPMOD32
Symbol: foo
- Offset: 0x00000000000000CE
Type: R_386_TLS_DTPOFF32
Symbol: foo
- Offset: 0x00000000000000D4
Type: R_386_TLS_TPOFF32
Symbol: foo
- Offset: 0x00000000000000DA
Type: R_386_TLS_GOTDESC
Symbol: foo
- Offset: 0x00000000000000E0
Type: R_386_TLS_DESC_CALL
Symbol: foo
- Offset: 0x00000000000000E6
Type: R_386_TLS_DESC
Symbol: foo
- Offset: 0x00000000000000EC
Type: R_386_IRELATIVE
Symbol: foo
- Offset: 0x00000000000000F2
Type: R_386_GOT32X
Symbol: foo
Symbols:
- Name: foo
Binding: STB_GLOBAL
|