rdwarf 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +16 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +28 -0
  6. data/README.md +39 -0
  7. data/Rakefile +8 -0
  8. data/bin/console +14 -0
  9. data/bin/setup +7 -0
  10. data/ext/rdwarf/depend +5 -0
  11. data/ext/rdwarf/extconf.rb +29 -0
  12. data/ext/rdwarf/libdwarf/CHANGES +102 -0
  13. data/ext/rdwarf/libdwarf/CODINGSTYLE +71 -0
  14. data/ext/rdwarf/libdwarf/COPYING +28 -0
  15. data/ext/rdwarf/libdwarf/ChangeLog +619 -0
  16. data/ext/rdwarf/libdwarf/ChangeLog2006 +835 -0
  17. data/ext/rdwarf/libdwarf/ChangeLog2007 +217 -0
  18. data/ext/rdwarf/libdwarf/ChangeLog2008 +263 -0
  19. data/ext/rdwarf/libdwarf/ChangeLog2009 +348 -0
  20. data/ext/rdwarf/libdwarf/ChangeLog2010 +175 -0
  21. data/ext/rdwarf/libdwarf/ChangeLog2011 +297 -0
  22. data/ext/rdwarf/libdwarf/ChangeLog2012 +131 -0
  23. data/ext/rdwarf/libdwarf/ChangeLog2013 +238 -0
  24. data/ext/rdwarf/libdwarf/ChangeLog2014 +399 -0
  25. data/ext/rdwarf/libdwarf/LGPL.txt +504 -0
  26. data/ext/rdwarf/libdwarf/LIBDWARFCOPYRIGHT +40 -0
  27. data/ext/rdwarf/libdwarf/Makefile.in +220 -0
  28. data/ext/rdwarf/libdwarf/NEWS +535 -0
  29. data/ext/rdwarf/libdwarf/README +235 -0
  30. data/ext/rdwarf/libdwarf/checkexamples.c +1179 -0
  31. data/ext/rdwarf/libdwarf/cmplrs/dwarf_addr_finder.h +55 -0
  32. data/ext/rdwarf/libdwarf/common.c +62 -0
  33. data/ext/rdwarf/libdwarf/common.h +38 -0
  34. data/ext/rdwarf/libdwarf/config.h.in +146 -0
  35. data/ext/rdwarf/libdwarf/configure +5581 -0
  36. data/ext/rdwarf/libdwarf/configure.in +167 -0
  37. data/ext/rdwarf/libdwarf/dw-linetableheader.txt +39 -0
  38. data/ext/rdwarf/libdwarf/dwarf.h +1342 -0
  39. data/ext/rdwarf/libdwarf/dwarf_abbrev.c +291 -0
  40. data/ext/rdwarf/libdwarf/dwarf_abbrev.h +45 -0
  41. data/ext/rdwarf/libdwarf/dwarf_addr_finder.c +676 -0
  42. data/ext/rdwarf/libdwarf/dwarf_alloc.c +685 -0
  43. data/ext/rdwarf/libdwarf/dwarf_alloc.h +38 -0
  44. data/ext/rdwarf/libdwarf/dwarf_arange.c +595 -0
  45. data/ext/rdwarf/libdwarf/dwarf_arange.h +62 -0
  46. data/ext/rdwarf/libdwarf/dwarf_base_types.h +157 -0
  47. data/ext/rdwarf/libdwarf/dwarf_die_deliv.c +1802 -0
  48. data/ext/rdwarf/libdwarf/dwarf_die_deliv.h +46 -0
  49. data/ext/rdwarf/libdwarf/dwarf_elf_access.c +1348 -0
  50. data/ext/rdwarf/libdwarf/dwarf_elf_access.h +46 -0
  51. data/ext/rdwarf/libdwarf/dwarf_error.c +492 -0
  52. data/ext/rdwarf/libdwarf/dwarf_error.h +53 -0
  53. data/ext/rdwarf/libdwarf/dwarf_form.c +1302 -0
  54. data/ext/rdwarf/libdwarf/dwarf_frame.c +2454 -0
  55. data/ext/rdwarf/libdwarf/dwarf_frame.h +418 -0
  56. data/ext/rdwarf/libdwarf/dwarf_frame2.c +1533 -0
  57. data/ext/rdwarf/libdwarf/dwarf_frame3.c +282 -0
  58. data/ext/rdwarf/libdwarf/dwarf_funcs.c +123 -0
  59. data/ext/rdwarf/libdwarf/dwarf_funcs.h +33 -0
  60. data/ext/rdwarf/libdwarf/dwarf_gdbindex.c +520 -0
  61. data/ext/rdwarf/libdwarf/dwarf_gdbindex.h +97 -0
  62. data/ext/rdwarf/libdwarf/dwarf_global.c +612 -0
  63. data/ext/rdwarf/libdwarf/dwarf_global.h +117 -0
  64. data/ext/rdwarf/libdwarf/dwarf_harmless.c +228 -0
  65. data/ext/rdwarf/libdwarf/dwarf_harmless.h +31 -0
  66. data/ext/rdwarf/libdwarf/dwarf_incl.h +61 -0
  67. data/ext/rdwarf/libdwarf/dwarf_init_finish.c +1263 -0
  68. data/ext/rdwarf/libdwarf/dwarf_leb.c +159 -0
  69. data/ext/rdwarf/libdwarf/dwarf_line.c +1822 -0
  70. data/ext/rdwarf/libdwarf/dwarf_line.h +446 -0
  71. data/ext/rdwarf/libdwarf/dwarf_line2.c +98 -0
  72. data/ext/rdwarf/libdwarf/dwarf_line_table_reader_common.c +1583 -0
  73. data/ext/rdwarf/libdwarf/dwarf_loc.c +1525 -0
  74. data/ext/rdwarf/libdwarf/dwarf_loc.h +149 -0
  75. data/ext/rdwarf/libdwarf/dwarf_loc2.c +833 -0
  76. data/ext/rdwarf/libdwarf/dwarf_macro.c +479 -0
  77. data/ext/rdwarf/libdwarf/dwarf_macro.h +35 -0
  78. data/ext/rdwarf/libdwarf/dwarf_opaque.h +778 -0
  79. data/ext/rdwarf/libdwarf/dwarf_original_elf_init.c +219 -0
  80. data/ext/rdwarf/libdwarf/dwarf_print_lines.c +631 -0
  81. data/ext/rdwarf/libdwarf/dwarf_pubtypes.c +132 -0
  82. data/ext/rdwarf/libdwarf/dwarf_query.c +1594 -0
  83. data/ext/rdwarf/libdwarf/dwarf_ranges.c +194 -0
  84. data/ext/rdwarf/libdwarf/dwarf_reloc_arm.h +308 -0
  85. data/ext/rdwarf/libdwarf/dwarf_reloc_mips.h +117 -0
  86. data/ext/rdwarf/libdwarf/dwarf_reloc_ppc.h +242 -0
  87. data/ext/rdwarf/libdwarf/dwarf_reloc_ppc64.h +272 -0
  88. data/ext/rdwarf/libdwarf/dwarf_reloc_x86_64.h +127 -0
  89. data/ext/rdwarf/libdwarf/dwarf_sort_line.c +665 -0
  90. data/ext/rdwarf/libdwarf/dwarf_string.c +82 -0
  91. data/ext/rdwarf/libdwarf/dwarf_stubs.c +38 -0
  92. data/ext/rdwarf/libdwarf/dwarf_tied.c +423 -0
  93. data/ext/rdwarf/libdwarf/dwarf_tsearch.h +125 -0
  94. data/ext/rdwarf/libdwarf/dwarf_tsearchhash.c +675 -0
  95. data/ext/rdwarf/libdwarf/dwarf_types.c +121 -0
  96. data/ext/rdwarf/libdwarf/dwarf_types.h +32 -0
  97. data/ext/rdwarf/libdwarf/dwarf_util.c +913 -0
  98. data/ext/rdwarf/libdwarf/dwarf_util.h +324 -0
  99. data/ext/rdwarf/libdwarf/dwarf_vars.c +125 -0
  100. data/ext/rdwarf/libdwarf/dwarf_vars.h +29 -0
  101. data/ext/rdwarf/libdwarf/dwarf_weaks.c +123 -0
  102. data/ext/rdwarf/libdwarf/dwarf_weaks.h +29 -0
  103. data/ext/rdwarf/libdwarf/dwarf_xu_index.c +579 -0
  104. data/ext/rdwarf/libdwarf/dwarf_xu_index.h +68 -0
  105. data/ext/rdwarf/libdwarf/dwgetopt.c +181 -0
  106. data/ext/rdwarf/libdwarf/dwgetopt.h +51 -0
  107. data/ext/rdwarf/libdwarf/gennames.c +531 -0
  108. data/ext/rdwarf/libdwarf/install.sh +119 -0
  109. data/ext/rdwarf/libdwarf/libdwarf.h.in +3746 -0
  110. data/ext/rdwarf/libdwarf/libdwarf2.1.mm +9805 -0
  111. data/ext/rdwarf/libdwarf/libdwarf2.1.pdf +0 -0
  112. data/ext/rdwarf/libdwarf/libdwarf2p.1.mm +2807 -0
  113. data/ext/rdwarf/libdwarf/libdwarf2p.1.pdf +0 -0
  114. data/ext/rdwarf/libdwarf/libdwarfdefs.h +81 -0
  115. data/ext/rdwarf/libdwarf/malloc_check.c +327 -0
  116. data/ext/rdwarf/libdwarf/malloc_check.h +52 -0
  117. data/ext/rdwarf/libdwarf/mips_extensions.mm +1266 -0
  118. data/ext/rdwarf/libdwarf/mips_extensions.pdf +0 -0
  119. data/ext/rdwarf/libdwarf/pro_alloc.c +179 -0
  120. data/ext/rdwarf/libdwarf/pro_alloc.h +33 -0
  121. data/ext/rdwarf/libdwarf/pro_arange.c +310 -0
  122. data/ext/rdwarf/libdwarf/pro_arange.h +51 -0
  123. data/ext/rdwarf/libdwarf/pro_die.c +431 -0
  124. data/ext/rdwarf/libdwarf/pro_die.h +59 -0
  125. data/ext/rdwarf/libdwarf/pro_encode_nm.c +108 -0
  126. data/ext/rdwarf/libdwarf/pro_encode_nm.h +39 -0
  127. data/ext/rdwarf/libdwarf/pro_error.c +96 -0
  128. data/ext/rdwarf/libdwarf/pro_error.h +43 -0
  129. data/ext/rdwarf/libdwarf/pro_expr.c +575 -0
  130. data/ext/rdwarf/libdwarf/pro_expr.h +36 -0
  131. data/ext/rdwarf/libdwarf/pro_finish.c +45 -0
  132. data/ext/rdwarf/libdwarf/pro_forms.c +1271 -0
  133. data/ext/rdwarf/libdwarf/pro_frame.c +572 -0
  134. data/ext/rdwarf/libdwarf/pro_frame.h +120 -0
  135. data/ext/rdwarf/libdwarf/pro_funcs.c +50 -0
  136. data/ext/rdwarf/libdwarf/pro_incl.h +91 -0
  137. data/ext/rdwarf/libdwarf/pro_init.c +327 -0
  138. data/ext/rdwarf/libdwarf/pro_line.c +373 -0
  139. data/ext/rdwarf/libdwarf/pro_line.h +112 -0
  140. data/ext/rdwarf/libdwarf/pro_macinfo.c +457 -0
  141. data/ext/rdwarf/libdwarf/pro_macinfo.h +31 -0
  142. data/ext/rdwarf/libdwarf/pro_opaque.h +513 -0
  143. data/ext/rdwarf/libdwarf/pro_pubnames.c +60 -0
  144. data/ext/rdwarf/libdwarf/pro_reloc.c +253 -0
  145. data/ext/rdwarf/libdwarf/pro_reloc.h +38 -0
  146. data/ext/rdwarf/libdwarf/pro_reloc_stream.c +256 -0
  147. data/ext/rdwarf/libdwarf/pro_reloc_stream.h +52 -0
  148. data/ext/rdwarf/libdwarf/pro_reloc_symbolic.c +245 -0
  149. data/ext/rdwarf/libdwarf/pro_reloc_symbolic.h +45 -0
  150. data/ext/rdwarf/libdwarf/pro_section.c +2233 -0
  151. data/ext/rdwarf/libdwarf/pro_section.h +100 -0
  152. data/ext/rdwarf/libdwarf/pro_types.c +274 -0
  153. data/ext/rdwarf/libdwarf/pro_types.h +34 -0
  154. data/ext/rdwarf/libdwarf/pro_util.h +38 -0
  155. data/ext/rdwarf/libdwarf/pro_vars.c +52 -0
  156. data/ext/rdwarf/libdwarf/pro_weaks.c +51 -0
  157. data/ext/rdwarf/rdwarf.c +765 -0
  158. data/ext/rdwarf/rdwarf.h +52 -0
  159. data/ext/rdwarf/rdwarf_names_gen.rb +109 -0
  160. data/lib/rdwarf.rb +181 -0
  161. data/lib/rdwarf/version.rb +3 -0
  162. data/rdwarf.gemspec +30 -0
  163. metadata +251 -0
@@ -0,0 +1,194 @@
1
+ /*
2
+
3
+ Copyright (C) 2008-2015 David Anderson. All Rights Reserved.
4
+ Portions Copyright 2012 SN Systems Ltd. All rights reserved.
5
+
6
+ This program is free software; you can redistribute it and/or modify it
7
+ under the terms of version 2.1 of the GNU Lesser General Public License
8
+ as published by the Free Software Foundation.
9
+
10
+ This program is distributed in the hope that it would be useful, but
11
+ WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+
14
+ Further, this software is distributed without any warranty that it is
15
+ free of the rightful claim of any third person regarding infringement
16
+ or the like. Any license provided herein, whether implied or
17
+ otherwise, applies only to this software file. Patent licenses, if
18
+ any, provided herein do not apply to combinations of this program with
19
+ other software, or any other product whatsoever.
20
+
21
+ You should have received a copy of the GNU Lesser General Public
22
+ License along with this program; if not, write the Free Software
23
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
24
+ USA.
25
+
26
+ */
27
+
28
+ #include "config.h"
29
+ #include <stdlib.h>
30
+ #include "dwarf_incl.h"
31
+
32
+ struct ranges_entry {
33
+ struct ranges_entry *next;
34
+ Dwarf_Ranges cur;
35
+ };
36
+
37
+
38
+ /* Ranges are never in a split dwarf object. In the base object
39
+ instead. So use the tied_object if present.
40
+ We return an error which is on the incoming dbg, not
41
+ the possibly-tied-dbg localdbg. */
42
+ #define MAX_ADDR ((address_size == 8)?0xffffffffffffffffULL:0xffffffff)
43
+ int dwarf_get_ranges_a(Dwarf_Debug dbg,
44
+ Dwarf_Off rangesoffset,
45
+ Dwarf_Die die,
46
+ Dwarf_Ranges ** rangesbuf,
47
+ Dwarf_Signed * listlen,
48
+ Dwarf_Unsigned * bytecount,
49
+ Dwarf_Error * error)
50
+ {
51
+ Dwarf_Small *rangeptr = 0;
52
+ Dwarf_Small *beginrangeptr = 0;
53
+ Dwarf_Small *section_end = 0;
54
+ unsigned entry_count = 0;
55
+ struct ranges_entry *base = 0;
56
+ struct ranges_entry *last = 0;
57
+ struct ranges_entry *curre = 0;
58
+ Dwarf_Ranges * ranges_data_out = 0;
59
+ unsigned copyindex = 0;
60
+ Dwarf_Half address_size = 0;
61
+ int res = DW_DLV_ERROR;
62
+ Dwarf_Unsigned rangebase = 0;
63
+ Dwarf_Debug localdbg = dbg;
64
+ Dwarf_Error localerror = 0;
65
+
66
+ if (localdbg->de_tied_data.td_tied_object) {
67
+ /* ASSERT: localdbg->de_debug_ranges is missing: DW_DLV_NO_ENTRY.
68
+ So lets not look in dbg. */
69
+ Dwarf_CU_Context context = 0;
70
+ int res = 0;
71
+
72
+ context = die->di_cu_context;
73
+ res = _dwarf_get_ranges_base_attr_from_tied(localdbg,
74
+ context,
75
+ &rangebase,
76
+ error);
77
+ if (res == DW_DLV_ERROR ) {
78
+ dwarf_dealloc(localdbg,*error,DW_DLA_ERROR);
79
+ *error = 0;
80
+ /* Nothing else to do. Look in original dbg. */
81
+ } else if (res == DW_DLV_NO_ENTRY ) {
82
+ /* Nothing else to do. Look in original dbg. */
83
+ } else {
84
+ /* Ranges are never in a split dwarf object.
85
+ In the base object
86
+ instead. Use the tied_object */
87
+ localdbg = dbg->de_tied_data.td_tied_object;
88
+ }
89
+ }
90
+
91
+
92
+ res = _dwarf_load_section(localdbg, &localdbg->de_debug_ranges,&localerror);
93
+ if (res == DW_DLV_ERROR) {
94
+ _dwarf_error_mv_s_to_t(localdbg,&localerror,dbg,error);
95
+ return res;
96
+ } else if (res == DW_DLV_NO_ENTRY) {
97
+ return res;
98
+ }
99
+
100
+ if ((rangesoffset +rangebase) >= localdbg->de_debug_ranges.dss_size) {
101
+ _dwarf_error(dbg, error, DW_DLE_DEBUG_RANGES_OFFSET_BAD);
102
+ return (DW_DLV_ERROR);
103
+
104
+ }
105
+ address_size = _dwarf_get_address_size(localdbg, die);
106
+ section_end = localdbg->de_debug_ranges.dss_data +
107
+ localdbg->de_debug_ranges.dss_size;
108
+ rangeptr = localdbg->de_debug_ranges.dss_data + rangesoffset+rangebase;
109
+ beginrangeptr = rangeptr;
110
+
111
+ for (;;) {
112
+ struct ranges_entry * re = calloc(sizeof(struct ranges_entry),1);
113
+ if (!re) {
114
+ _dwarf_error(dbg, error, DW_DLE_DEBUG_RANGES_OUT_OF_MEM);
115
+ return (DW_DLV_ERROR);
116
+ }
117
+ if (rangeptr >= section_end) {
118
+ return (DW_DLV_NO_ENTRY);
119
+ }
120
+ if ((rangeptr + (2*address_size)) > section_end) {
121
+ _dwarf_error(dbg, error, DW_DLE_DEBUG_RANGES_OFFSET_BAD);
122
+ return (DW_DLV_ERROR);
123
+ }
124
+ entry_count++;
125
+ READ_UNALIGNED(localdbg,re->cur.dwr_addr1,
126
+ Dwarf_Addr, rangeptr,
127
+ address_size);
128
+ rangeptr += address_size;
129
+ READ_UNALIGNED(localdbg,re->cur.dwr_addr2 ,
130
+ Dwarf_Addr, rangeptr,
131
+ address_size);
132
+ rangeptr += address_size;
133
+ if (!base) {
134
+ base = re;
135
+ last = re;
136
+ } else {
137
+ last->next = re;
138
+ last = re;
139
+ }
140
+ if (re->cur.dwr_addr1 == 0 && re->cur.dwr_addr2 == 0) {
141
+ re->cur.dwr_type = DW_RANGES_END;
142
+ break;
143
+ } else if (re->cur.dwr_addr1 == MAX_ADDR) {
144
+ re->cur.dwr_type = DW_RANGES_ADDRESS_SELECTION;
145
+ } else {
146
+ re->cur.dwr_type = DW_RANGES_ENTRY;
147
+ }
148
+ }
149
+
150
+ /* We return ranges on dbg, so use that to allocate. */
151
+ ranges_data_out = (Dwarf_Ranges *)
152
+ _dwarf_get_alloc(dbg,DW_DLA_RANGES,entry_count);
153
+ if (!ranges_data_out) {
154
+ /* Error, apply to original, not local dbg. */
155
+ _dwarf_error(dbg, error, DW_DLE_DEBUG_RANGES_OUT_OF_MEM);
156
+ return (DW_DLV_ERROR);
157
+ }
158
+ curre = base;
159
+ *rangesbuf = ranges_data_out;
160
+ *listlen = entry_count;
161
+ for (copyindex = 0; curre && (copyindex < entry_count);
162
+ ++copyindex,++ranges_data_out) {
163
+
164
+ struct ranges_entry *r = curre;
165
+ *ranges_data_out = curre->cur;
166
+ curre = curre->next;
167
+ free(r);
168
+ }
169
+ /* Callers will often not care about the bytes used. */
170
+ if (bytecount) {
171
+ *bytecount = rangeptr - beginrangeptr;
172
+ }
173
+ return DW_DLV_OK;
174
+ }
175
+ int dwarf_get_ranges(Dwarf_Debug dbg,
176
+ Dwarf_Off rangesoffset,
177
+ Dwarf_Ranges ** rangesbuf,
178
+ Dwarf_Signed * listlen,
179
+ Dwarf_Unsigned * bytecount,
180
+ Dwarf_Error * error)
181
+ {
182
+ Dwarf_Die die = 0;
183
+ int res = dwarf_get_ranges_a(dbg,rangesoffset,die,
184
+ rangesbuf,listlen,bytecount,error);
185
+ return res;
186
+ }
187
+
188
+ void
189
+ dwarf_ranges_dealloc(Dwarf_Debug dbg, Dwarf_Ranges * rangesbuf,
190
+ Dwarf_Signed rangecount)
191
+ {
192
+ dwarf_dealloc(dbg,rangesbuf, DW_DLA_RANGES);
193
+ }
194
+
@@ -0,0 +1,308 @@
1
+ /*
2
+ Copyright (C) 2007-2012 David Anderson. All Rights Reserved.
3
+ Portions Copyright (C) 2012 SN Systems Ltd. All rights reserved.
4
+
5
+ This program is free software; you can redistribute it and/or modify it
6
+ under the terms of version 2.1 of the GNU Lesser General Public License
7
+ as published by the Free Software Foundation.
8
+
9
+ This program is distributed in the hope that it would be useful, but
10
+ WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
+
13
+ Further, this software is distributed without any warranty that it is
14
+ free of the rightful claim of any third person regarding infringement
15
+ or the like. Any license provided herein, whether implied or
16
+ otherwise, applies only to this software file. Patent licenses, if
17
+ any, provided herein do not apply to combinations of this program with
18
+ other software, or any other product whatsoever.
19
+
20
+ You should have received a copy of the GNU Lesser General Public License along
21
+ with this program; if not, write the Free Software Foundation, Inc., 51
22
+ Franklin Street - Fifth Floor, Boston MA 02110-1301, USA.
23
+ */
24
+
25
+ #ifndef DWARF_RELOC_ARM_H
26
+ #define DWARF_RELOC_ARM_H
27
+
28
+ /* Definitions for ARM */
29
+ #define DWARF_RELOC_ARM
30
+
31
+ #ifndef EM_AARCH64
32
+ #define EM_AARCH64 183 /* Arm 64 */
33
+ #endif
34
+
35
+
36
+ /* Include the definitions only in the case of Windows */
37
+ #ifdef WIN32
38
+ /* Relocation types for ARM */
39
+ #define R_ARM_NONE 0
40
+ #define R_ARM_PC24 1
41
+ #define R_ARM_ABS32 2
42
+ #define R_ARM_REL32 3
43
+ #define R_ARM_LDR_PC_G0 4
44
+ #define R_ARM_ABS16 5
45
+ #define R_ARM_ABS12 6
46
+ #define R_ARM_THM_ABS5 7
47
+ #define R_ARM_ABS8 8
48
+ #define R_ARM_SBREL32 9
49
+ #define R_ARM_THM_CALL 10
50
+ #define R_ARM_THM_PC8 11
51
+ #define R_ARM_BREL_ADJ 12
52
+ #define R_ARM_TLS_DESC 13
53
+ #define R_ARM_THM_SWI8 14
54
+ #define R_ARM_XPC25 15
55
+ #define R_ARM_THM_XPC22 16
56
+ #define R_ARM_TLS_DTPMOD32 17
57
+ #define R_ARM_TLS_DTPOFF32 18
58
+ #define R_ARM_TLS_TPOFF32 19
59
+ #define R_ARM_COPY 20
60
+ #define R_ARM_GLOB_DAT 21
61
+ #define R_ARM_JUMP_SLOT 22
62
+ #define R_ARM_RELATIVE 23
63
+ #define R_ARM_GOTOFF32 24
64
+ #define R_ARM_BASE_PREL 25
65
+ #define R_ARM_GOT_BREL 26
66
+ #define R_ARM_PLT32 27
67
+ #define R_ARM_CALL 28
68
+ #define R_ARM_JUMP24 29
69
+ #define R_ARM_THM_JUMP24 30
70
+ #define R_ARM_BASE_ABS 31
71
+ #define R_ARM_ALU_PCREL_7_0 32
72
+ #define R_ARM_ALU_PCREL_15_8 33
73
+ #define R_ARM_ALU_PCREL_23_15 34
74
+ #define R_ARM_LDR_SBREL_11_0_NC 35
75
+ #define R_ARM_ALU_SBREL_19_12_NC 36
76
+ #define R_ARM_ALU_SBREL_27_20_CK 37
77
+ #define R_ARM_TARGET1 38
78
+ #define R_ARM_SBREL31 39
79
+ #define R_ARM_V4BX 40
80
+ #define R_ARM_TARGET2 41
81
+ #define R_ARM_PREL31 42
82
+ #define R_ARM_MOVW_ABS_NC 43
83
+ #define R_ARM_MOVT_ABS 44
84
+ #define R_ARM_MOVW_PREL_NC 45
85
+ #define R_ARM_MOVT_PREL 46
86
+ #define R_ARM_THM_MOVW_ABS_NC 47
87
+ #define R_ARM_THM_MOVT_ABS 48
88
+ #define R_ARM_THM_MOVW_PREL_NC 49
89
+ #define R_ARM_THM_MOVT_PREL 50
90
+ #define R_ARM_THM_JUMP19 51
91
+ #define R_ARM_THM_JUMP6 52
92
+ #define R_ARM_THM_ALU_PREL_11_0 53
93
+ #define R_ARM_THM_PC12 54
94
+ #define R_ARM_ABS32_NOI 55
95
+ #define R_ARM_REL32_NOI 56
96
+ #define R_ARM_ALU_PC_G0_NC 57
97
+ #define R_ARM_ALU_PC_G0 58
98
+ #define R_ARM_ALU_PC_G1_NC 59
99
+ #define R_ARM_ALU_PC_G1 60
100
+ #define R_ARM_ALU_PC_G2 61
101
+ #define R_ARM_LDR_PC_G1 62
102
+ #define R_ARM_LDR_PC_G2 63
103
+ #define R_ARM_LDRS_PC_G0 64
104
+ #define R_ARM_LDRS_PC_G1 65
105
+ #define R_ARM_LDRS_PC_G2 66
106
+ #define R_ARM_LDC_PC_G0 67
107
+ #define R_ARM_LDC_PC_G1 68
108
+ #define R_ARM_LDC_PC_G2 69
109
+ #define R_ARM_ALU_SB_G0_NC 70
110
+ #define R_ARM_ALU_SB_G0 71
111
+ #define R_ARM_ALU_SB_G1_NC 72
112
+ #define R_ARM_ALU_SB_G1 73
113
+ #define R_ARM_ALU_SB_G2 74
114
+ #define R_ARM_LDR_SB_G0 75
115
+ #define R_ARM_LDR_SB_G1 76
116
+ #define R_ARM_LDR_SB_G2 77
117
+ #define R_ARM_LDRS_SB_G0 78
118
+ #define R_ARM_LDRS_SB_G1 79
119
+ #define R_ARM_LDRS_SB_G2 80
120
+ #define R_ARM_LDC_SB_G0 81
121
+ #define R_ARM_LDC_SB_G1 82
122
+ #define R_ARM_LDC_SB_G2 83
123
+ #define R_ARM_MOVW_BREL_NC 84
124
+ #define R_ARM_MOVT_BREL 85
125
+ #define R_ARM_MOVW_BREL 86
126
+ #define R_ARM_THM_MOVW_BREL_NC 87
127
+ #define R_ARM_THM_MOVT_BREL 88
128
+ #define R_ARM_THM_MOVW_BREL 89
129
+ #define R_ARM_TLS_GOTDESC 90
130
+ #define R_ARM_TLS_CALL 91
131
+ #define R_ARM_TLS_DESCSEQ 92
132
+ #define R_ARM_THM_TLS_CALL 93
133
+ #define R_ARM_PLT32_ABS 94
134
+ #define R_ARM_GOT_ABS 95
135
+ #define R_ARM_GOT_PREL 96
136
+ #define R_ARM_GOT_BREL12 97
137
+ #define R_ARM_GOTOFF12 98
138
+ #define R_ARM_GOTRELAX 99
139
+ #define R_ARM_GNU_VTENTRY 100
140
+ #define R_ARM_GNU_VTINHERIT 101
141
+ #define R_ARM_THM_JUMP11 102
142
+ #define R_ARM_THM_JUMP8 103
143
+ #define R_ARM_TLS_GD32 104
144
+ #define R_ARM_TLS_LDM32 105
145
+ #define R_ARM_TLS_LDO32 106
146
+ #define R_ARM_TLS_IE32 107
147
+ #define R_ARM_TLS_LE32 108
148
+ #define R_ARM_TLS_LDO12 109
149
+ #define R_ARM_TLS_LE12 110
150
+ #define R_ARM_TLS_IE12GP 111
151
+ #define R_ARM_ME_TOO 128
152
+ #define R_ARM_THM_TLS_DESCSEQ16 129
153
+ #define R_ARM_THM_TLS_DESCSEQ32 130
154
+ #define R_ARM_RXPC25 249
155
+ #define R_ARM_RSBREL32 250
156
+ #define R_ARM_THM_RPC22 251
157
+ #define R_ARM_RREL32 252
158
+ #define R_ARM_RABS32 253
159
+ #define R_ARM_RPC24 254
160
+ #define R_ARM_RBASE 255
161
+
162
+ /* Keep this the last entry. */
163
+ #define R_ARM_NUM 256
164
+ #endif /* WIN32 */
165
+
166
+ /* ARM relocations defined by the ABIs */
167
+ static const char *reloc_type_names_ARM[] = {
168
+ "R_ARM_NONE", /* 00 */
169
+ "R_ARM_PC24", /* 01 */
170
+ "R_ARM_ABS32", /* 02 */
171
+ "R_ARM_REL32", /* 03 */
172
+ "R_ARM_LDR_PC_G0", /* 04 */
173
+ "R_ARM_ABS16", /* 05 */
174
+ "R_ARM_ABS12", /* 06 */
175
+ "R_ARM_THM_ABS5", /* 07 */
176
+ "R_ARM_ABS8", /* 08 */
177
+ "R_ARM_SBREL32", /* 09 */
178
+ "R_ARM_THM_CALL", /* 10 */
179
+ "R_ARM_THM_PC8", /* 11 */
180
+ "R_ARM_BREL_ADJ", /* 12 */
181
+ "R_ARM_TLS_DESC", /* 13 */
182
+ "R_ARM_THM_SWI8", /* 14 */
183
+ "R_ARM_XPC25", /* 15 */
184
+ "R_ARM_THM_XPC22", /* 16 */
185
+ "R_ARM_TLS_DTPMOD32", /* 17 */
186
+ "R_ARM_TLS_DTPOFF32", /* 18 */
187
+ "R_ARM_TLS_TPOFF32", /* 19 */
188
+ "R_ARM_COPY", /* 20 */
189
+ "R_ARM_GLOB_DAT", /* 21 */
190
+ "R_ARM_JUMP_SLOT", /* 22 */
191
+ "R_ARM_RELATIVE", /* 23 */
192
+ "R_ARM_GOTOFF32", /* 24 */
193
+ "R_ARM_BASE_PREL", /* 25 */
194
+ "R_ARM_GOT_BREL", /* 26 */
195
+ "R_ARM_PLT32", /* 27 */
196
+ "R_ARM_CALL", /* 28 */
197
+ "R_ARM_JUMP24", /* 29 */
198
+ "R_ARM_THM_JUMP24", /* 30 */
199
+ "R_ARM_BASE_ABS", /* 31 */
200
+ "R_ARM_ALU_PCREL_7_0", /* 32 */
201
+ "R_ARM_ALU_PCREL_15_8", /* 33 */
202
+ "R_ARM_ALU_PCREL_23_15", /* 34 */
203
+ "R_ARM_LDR_SBREL_11_0_NC", /* 35 */
204
+ "R_ARM_ALU_SBREL_19_12_NC", /* 36 */
205
+ "R_ARM_ALU_SBREL_27_20_CK", /* 37 */
206
+ "R_ARM_TARGET1", /* 38 */
207
+ "R_ARM_SBREL31", /* 39 */
208
+ "R_ARM_V4BX", /* 40 */
209
+ "R_ARM_TARGET2", /* 41 */
210
+ "R_ARM_PREL31", /* 42 */
211
+ "R_ARM_MOVW_ABS_NC", /* 43 */
212
+ "R_ARM_MOVT_ABS", /* 44 */
213
+ "R_ARM_MOVW_PREL_NC", /* 45 */
214
+ "R_ARM_MOVT_PREL", /* 46 */
215
+ "R_ARM_THM_MOVW_ABS_NC", /* 47 */
216
+ "R_ARM_THM_MOVT_ABS", /* 48 */
217
+ "R_ARM_THM_MOVW_PREL_NC", /* 49 */
218
+ "R_ARM_THM_MOVT_PREL", /* 50 */
219
+ "R_ARM_THM_JUMP19", /* 51 */
220
+ "R_ARM_THM_JUMP6", /* 52 */
221
+ "R_ARM_THM_ALU_PREL_11_0", /* 53 */
222
+ "R_ARM_THM_PC12", /* 54 */
223
+ "R_ARM_ABS32_NOI", /* 55 */
224
+ "R_ARM_REL32_NOI", /* 56 */
225
+ "R_ARM_ALU_PC_G0_NC", /* 57 */
226
+ "R_ARM_ALU_PC_G0", /* 58 */
227
+ "R_ARM_ALU_PC_G1_NC", /* 59 */
228
+ "R_ARM_ALU_PC_G1", /* 60 */
229
+ "R_ARM_ALU_PC_G2", /* 61 */
230
+ "R_ARM_LDR_PC_G1", /* 62 */
231
+ "R_ARM_LDR_PC_G2", /* 63 */
232
+ "R_ARM_LDRS_PC_G0", /* 64 */
233
+ "R_ARM_LDRS_PC_G1", /* 65 */
234
+ "R_ARM_LDRS_PC_G2", /* 66 */
235
+ "R_ARM_LDC_PC_G0", /* 67 */
236
+ "R_ARM_LDC_PC_G1", /* 68 */
237
+ "R_ARM_LDC_PC_G2", /* 69 */
238
+ "R_ARM_ALU_SB_G0_NC", /* 70 */
239
+ "R_ARM_ALU_SB_G0", /* 71 */
240
+ "R_ARM_ALU_SB_G1_NC", /* 72 */
241
+ "R_ARM_ALU_SB_G1", /* 73 */
242
+ "R_ARM_ALU_SB_G2", /* 74 */
243
+ "R_ARM_LDR_SB_G0", /* 75 */
244
+ "R_ARM_LDR_SB_G1", /* 76 */
245
+ "R_ARM_LDR_SB_G2", /* 77 */
246
+ "R_ARM_LDRS_SB_G0", /* 78 */
247
+ "R_ARM_LDRS_SB_G1", /* 79 */
248
+ "R_ARM_LDRS_SB_G2", /* 80 */
249
+ "R_ARM_LDC_SB_G0", /* 81 */
250
+ "R_ARM_LDC_SB_G1", /* 82 */
251
+ "R_ARM_LDC_SB_G2", /* 83 */
252
+ "R_ARM_MOVW_BREL_NC", /* 84 */
253
+ "R_ARM_MOVT_BREL", /* 85 */
254
+ "R_ARM_MOVW_BREL", /* 86 */
255
+ "R_ARM_THM_MOVW_BREL_NC", /* 87 */
256
+ "R_ARM_THM_MOVT_BREL", /* 88 */
257
+ "R_ARM_THM_MOVW_BREL", /* 89 */
258
+ "R_ARM_TLS_GOTDESC", /* 90 */
259
+ "R_ARM_TLS_CALL", /* 91 */
260
+ "R_ARM_TLS_DESCSEQ", /* 92 */
261
+ "R_ARM_THM_TLS_CALL", /* 93 */
262
+ "R_ARM_PLT32_ABS", /* 94 */
263
+ "R_ARM_GOT_ABS", /* 95 */
264
+ "R_ARM_GOT_PREL", /* 96 */
265
+ "R_ARM_GOT_BREL12", /* 97 */
266
+ "R_ARM_GOTOFF12", /* 98 */
267
+ "R_ARM_GOTRELAX", /* 99 */
268
+ "R_ARM_GNU_VTENTRY", /* 100 */
269
+ "R_ARM_GNU_VTINHERIT", /* 101 */
270
+ "R_ARM_THM_JUMP11", /* 102 */
271
+ "R_ARM_THM_JUMP8", /* 103 */
272
+ "R_ARM_TLS_GD32", /* 104 */
273
+ "R_ARM_TLS_LDM32", /* 105 */
274
+ "R_ARM_TLS_LDO32", /* 106 */
275
+ "R_ARM_TLS_IE32", /* 107 */
276
+ "R_ARM_TLS_LE32", /* 108 */
277
+ "R_ARM_TLS_LDO12", /* 109 */
278
+ "R_ARM_TLS_LE12", /* 110 */
279
+ "R_ARM_TLS_IE12GP", /* 111 */
280
+ "R_ARM_TLS_MOVT_TPOFF32", /* 112 */ /* "R_ARM_PRIVATE_0" */
281
+ "R_ARM_TLS_MOVW_TPOFF32", /* 113 */ /* "R_ARM_PRIVATE_1" */
282
+ "R_ARM_THM_TLS_MOVT_TPOFF32", /* 114 */ /* "R_ARM_PRIVATE_2" */
283
+ "R_ARM_THM_TLS_MOVT_TPOFF32", /* 115 */ /* "R_ARM_PRIVATE_3" */
284
+ "R_ARM_PRIVATE_4", /* 116 */
285
+ "R_ARM_PRIVATE_5", /* 117 */
286
+ "R_ARM_PRIVATE_6", /* 118 */
287
+ "R_ARM_PRIVATE_7", /* 119 */
288
+ "R_ARM_PRIVATE_8", /* 120 */
289
+ "R_ARM_PRIVATE_9", /* 121 */
290
+ "R_ARM_PRIVATE_10", /* 122 */
291
+ "R_ARM_PRIVATE_11", /* 123 */
292
+ "R_ARM_PRIVATE_12", /* 124 */
293
+ "R_ARM_PRIVATE_13", /* 125 */
294
+ "R_ARM_PRIVATE_14", /* 126 */
295
+ "R_ARM_PRIVATE_15", /* 127 */
296
+ "R_ARM_ME_TOO", /* 128 */
297
+ "R_ARM_THM_TLS_DESCSEQ16", /* 129 */
298
+ "R_ARM_THM_TLS_DESCSEQ32", /* 130 */
299
+ };
300
+
301
+ #ifndef R_AARCH64_ABS64
302
+ #define R_AARCH64_ABS64 0x101
303
+ #endif
304
+ #ifndef R_AARCH64_ABS32
305
+ #define R_AARCH64_ABS32 0x102
306
+ #endif
307
+
308
+ #endif /* DWARF_RELOC_ARM_H */