VirtualBox

source: vbox/trunk/src/VBox/Runtime/testcase/tstRTLdrMachORelocs-1.S@ 61718

Last change on this file since 61718 was 55516, checked in by vboxsync, 10 years ago

mach-o AMD64 relocation testcase.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/*
2 * as -o tstRTLdrMachORelocs-1-as.o tstRTLdrMachORelocs-1.S
3 * ld -r -o tstRTLdrMachORelocs-1.o tstRTLdrMachORelocs-1-as.o
4 * tstLdr-3 0x2000 tstRTLdrMachORelocs-1.o 0x2000 > tmp.disas
5 * diff tmp.disas tstRTLdrMachORelocs-1.disas
6 */
7 .section __TEXT,__text,regular,pure_instructions
8 .globl _myfunc6
9 .align 4, 0x90
10_myfunc6:
11Leh_func_begin6:
12 .byte 0x90
13 .byte 0x48, 0xb8 /* movabsq */
14 .quad Lg_LocalData
15 movb Lg_LocalData(%rip), %al
16 cmpb $0x7f, Lg_LocalData(%rip)
17 cmpw $0x117f, Lg_LocalData(%rip)
18 cmpl $0x9988117f, Lg_LocalData(%rip)
19 jmp Lg_LocalData
20
21 .byte 0x90
22 .byte 0x48, 0xb8 /* movabsq */
23 .quad Leh_func_end6
24 movb Leh_func_end6(%rip), %al
25 cmpb $0x7e, Leh_func_end6(%rip)
26 cmpw $0x117e, Leh_func_end6(%rip)
27 cmpl $0x9988117e, Leh_func_end6(%rip)
28 jmp Leh_func_end6
29
30 .byte 0x90
31 .byte 0x48, 0xb8 /* movabsq */
32 .quad _g_Data.3-3
33 movb _g_Data.3-3(%rip), %al
34 cmpb $4, _g_Data.3-3(%rip)
35 jmp _g_Data.3-3
36
37 .byte 0x90
38 .byte 0x48, 0xb8 /* movabsq */
39 .quad _g_Data.3
40 movb _g_Data.3(%rip), %al
41 cmpb $5, _g_Data.3(%rip)
42 cmpw $1105, _g_Data.3(%rip)
43 cmpl $99881105, _g_Data.3(%rip)
44 jmp _g_Data.3
45
46 .byte 0x90
47 .byte 0x48, 0xb8 /* movabsq */
48 .quad abssym
49 movb abssym(%rip), %al
50 cmpb $6, abssym(%rip)
51 cmpw $1106, abssym(%rip)
52 cmpl $99881106, abssym(%rip)
53 jmp abssym
541193046 = 0x123456 (1193046)+00000000000000dd
55
56 .byte 0x90
57 cmpb $1, _g_Data.4.1(%rip)
58 cmpb $2, _g_Data.4.2(%rip)
59 cmpb $3, _g_Data.4.3(%rip)
60
61 /* X86_64_RELOC_SUBTRACTOR */
62 .byte 0x90
63 .byte 0x48, 0xb8 /* movabsq */
64 .quad Leh_func_end6 - _g_Data.0
65 .byte 0x48, 0xb8 /* movabsq */
66 .quad Leh_func_end6 - _g_Data.0 + 0x80
67 .byte 0x48, 0xb8 /* movabsq */
68 .quad _myfunc6_end - _g_Data.0
69 .byte 0x48, 0xb8 /* movabsq */
70 .quad _myfunc6_end - _g_Data.0 + 0x80
71 .align 4, 0xcc
72_myfunc6_end:
73
74 .section __TEXT,__othertext,regular,pure_instructions
75 .align 3, 0xcc
76Leh_func_end6:
77 .byte 0x90
78 .byte 0x90
79 .byte 0xcc
80 .byte 0xcc
81 .byte 0x90
82 .byte 0x90
83 .byte 0xcc
84 .byte 0xcc
85
86 .section __DATA,__data,regular,pure_instructions
87 .align 3, 0xcc
88_g_Data.0:
89 .byte 0x90
90_g_Data.1:
91 .byte 0xcc
92_g_Data.2:
93 .byte 0x90
94_g_Data.3:
95 .byte 0xcc
96_g_Data.4.0:
97 .byte 0x90
98_g_Data.4.1:
99 .byte 0xcc
100_g_Data.4.2:
101 .byte 0x90
102_g_Data.4.3:
103 .byte 0xcc
104_g_EndOfData:
105
106 .section __GROG,__foobar,regular,pure_instructions
107 .align 3, 0xcc
108 .byte 0x90
109Lg_LocalDataMinus3:
110 .byte 0x90
111Lg_LocalDataMinus2:
112 .byte 0x90
113Lg_LocalDataMinus1:
114 .byte 0x90
115Lg_LocalData:
116 .byte 0xcc
117 .byte 0xcc
118 .byte 0xcc
119 .byte 0xcc
120 .byte 0xcc
121 .byte 0xcc
122
123.set abssym, 0x123456
124.globl abssym
125
126.subsections_via_symbols
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette