File: x86_32-scattered-reloc-fallback.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (31 lines) | stat: -rw-r--r-- 1,015 bytes parent folder | download | duplicates (21)
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
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -S --sd - | FileCheck %s

// rdar://15526046

.text
.globl _main
_main:
	.space 0x01020f55, 0x90
bug:
	movl  $0, _key64b_9+4
.section __TEXT, __padding
	.space 0x515b91, 0
.data
	.space 0xa70, 0
.globl _key64b_9
_key64b_9:
	.long 1
	.long 2

// The movl instruction above should produce this encoding where the address
// of _key64b_9 is at 0x01537560.  This is testing falling back from using a
// scattered relocation to a normal relocation because the offset from the
// start of the section is more than 24-bits.  But need to get the item to
// be relocated, in this case _key64b_9+4, value correct in the instruction.
// 01020f55	c7056475530100000000	movl	$0x0, 0x1537564

// CHECK: SectionData (
// CHECK: F75530: 90909090 90909090 90909090 90909090  |................|
// CHECK: 1020F50: 90909090 90C70564 75530100 000000    |.......duS.....|
// CHECK: 75530: 00000000 00000000 00000000 00000000  |................|
// CHECK: )