• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2013 The Android Open Source Project
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *  * Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  *  * Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in
12  *    the documentation and/or other materials provided with the
13  *    distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28 
29 #ifndef _AARCH64_ELF_MACHDEP_H_
30 #define _AARCH64_ELF_MACHDEP_H_
31 
32 /* Null relocations */
33 #define R_ARM_NONE                      0
34 #define R_AARCH64_NONE                  256
35 
36 /* Static Data relocations */
37 #define R_AARCH64_ABS64                 257
38 #define R_AARCH64_ABS32                 258
39 #define R_AARCH64_ABS16                 259
40 #define R_AARCH64_PREL64                260
41 #define R_AARCH64_PREL32                261
42 #define R_AARCH64_PREL16                262
43 
44 #define R_AARCH64_MOVW_UABS_G0          263
45 #define R_AARCH64_MOVW_UABS_G0_NC       264
46 #define R_AARCH64_MOVW_UABS_G1          265
47 #define R_AARCH64_MOVW_UABS_G1_NC       266
48 #define R_AARCH64_MOVW_UABS_G2          267
49 #define R_AARCH64_MOVW_UABS_G2_NC       268
50 #define R_AARCH64_MOVW_UABS_G3          269
51 #define R_AARCH64_MOVW_SABS_G0          270
52 #define R_AARCH64_MOVW_SABS_G1          271
53 #define R_AARCH64_MOVW_SABS_G2          272
54 
55 /* PC-relative addresses */
56 #define R_AARCH64_LD_PREL_LO19          273
57 #define R_AARCH64_ADR_PREL_LO21         274
58 #define R_AARCH64_ADR_PREL_PG_HI21      275
59 #define R_AARCH64_ADR_PREL_PG_HI21_NC   276
60 #define R_AARCH64_ADD_ABS_LO12_NC       277
61 #define R_AARCH64_LDST8_ABS_LO12_NC     278
62 
63 /* Control-flow relocations */
64 #define R_AARCH64_TSTBR14               279
65 #define R_AARCH64_CONDBR19              280
66 #define R_AARCH64_JUMP26                282
67 #define R_AARCH64_CALL26                283
68 #define R_AARCH64_LDST16_ABS_LO12_NC    284
69 #define R_AARCH64_LDST32_ABS_LO12_NC    285
70 #define R_AARCH64_LDST64_ABS_LO12_NC    286
71 #define R_AARCH64_LDST128_ABS_LO12_NC   299
72 
73 #define R_AARCH64_MOVW_PREL_G0          287
74 #define R_AARCH64_MOVW_PREL_G0_NC       288
75 #define R_AARCH64_MOVW_PREL_G1          289
76 #define R_AARCH64_MOVW_PREL_G1_NC       290
77 #define R_AARCH64_MOVW_PREL_G2          291
78 #define R_AARCH64_MOVW_PREL_G2_NC       292
79 #define R_AARCH64_MOVW_PREL_G3          293
80 
81 /* Dynamic relocations */
82 #define R_AARCH64_COPY                  1024
83 #define R_AARCH64_GLOB_DAT              1025    /* Create GOT entry.  */
84 #define R_AARCH64_JUMP_SLOT             1026    /* Create PLT entry.  */
85 #define R_AARCH64_RELATIVE              1027    /* Adjust by program base.  */
86 #define R_AARCH64_TLS_DTPREL64          1028    /* Module-relative offset. */
87 #define R_AARCH64_TLS_DTPMOD64          1029    /* Module index. */
88 #define R_AARCH64_TLS_TPREL64           1030    /* TP-relative offset. */
89 #define R_AARCH64_TLSDESC               1031    /* 16-byte descriptor: resolver func + arg. */
90 #define R_AARCH64_IRELATIVE             1032
91 
92 #endif /* _AARCH64_ELF_MACHDEP_H_ */
93