[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / llvm / test / MC / MachO / x86_32-scattered-reloc-fallback.s
blobc9e25f675a4562976d15f793fa0418f83ff3de07
1 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -S --sd - | FileCheck %s
3 // rdar://15526046
5 .text
6 .globl _main
7 _main:
8 .space 0x01020f55, 0x90
9 bug:
10 movl $0, _key64b_9+4
11 .section __TEXT, __padding
12 .space 0x515b91, 0
13 .data
14 .space 0xa70, 0
15 .globl _key64b_9
16 _key64b_9:
17 .long 1
18 .long 2
20 // The movl instruction above should produce this encoding where the address
21 // of _key64b_9 is at 0x01537560. This is testing falling back from using a
22 // scattered relocation to a normal relocation because the offset from the
23 // start of the section is more than 24-bits. But need to get the item to
24 // be relocated, in this case _key64b_9+4, value correct in the instruction.
25 // 01020f55 c7056475530100000000 movl $0x0, 0x1537564
27 // CHECK: SectionData (
28 // CHECK: F75530: 90909090 90909090 90909090 90909090 |................|
29 // CHECK: 1020F50: 90909090 90C70564 75530100 000000 |.......duS.....|
30 // CHECK: 75530: 00000000 00000000 00000000 00000000 |................|
31 // CHECK: )