1#
2# Copyright (C) 2018 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16/*
17To generate sleb128 encoded bytes:
18  llvm-mc -filetype=asm
19
20.section test.rela,"a",@0x60000002
21
22.ascii "APS2"
23
24.sleb128 6          // Number of relocations
25.sleb128 0x200000   // Offset
26
27// Group 1
28.sleb128 2
29.sleb128 0
30
31.sleb128 8              // Offset delta
32.sleb128 (1 << 32) | 1  // Symbol index 1 R_X86_64_64
33.sleb128 8              // Offset delta
34.sleb128 (2 << 32) | 1  // Symbol index 2 R_X86_64_64
35
36// Group 2
37.sleb128 4
38.sleb128 9              // Group by info & group has addend
39.sleb128 8              // R_X86_RELATIVE
40
41.sleb128 16             // Offset delta
42.sleb128 128            // Addend delta
43.sleb128 16             // Offset delta
44.sleb128 8              // Addend delta
45.sleb128 16             // Offset delta
46.sleb128 16             // Addend delta
47.sleb128 16             // Offset delta
48.sleb128 32             // Addend delta
49*/
50
51.section test.rela,"a",@0x60000002
52
53.ascii "APS2"
54
55.byte 6
56.ascii "\200\200\200\001"
57
58.byte 2
59.byte 0
60
61.byte 8
62.ascii "\201\200\200\200\020"
63.byte 8
64.ascii "\201\200\200\200 "
65
66.byte 4
67.byte 9
68.byte 8
69
70.byte 16
71.ascii "\200\001"
72.byte 16
73.byte 8
74.byte 16
75.byte 16
76.byte 16
77.byte 32
78