File tree Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Expand file tree Collapse file tree 2 files changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,26 @@ static inline unsigned int get_secindex(unsigned int shndx,
173
173
return r (& symtab_shndx_start [sym_offs ]);
174
174
}
175
175
176
+ static int compare_extable_32 (const void * a , const void * b )
177
+ {
178
+ Elf32_Addr av = r (a );
179
+ Elf32_Addr bv = r (b );
180
+
181
+ if (av < bv )
182
+ return -1 ;
183
+ return av > bv ;
184
+ }
185
+
186
+ static int compare_extable_64 (const void * a , const void * b )
187
+ {
188
+ Elf64_Addr av = r8 (a );
189
+ Elf64_Addr bv = r8 (b );
190
+
191
+ if (av < bv )
192
+ return -1 ;
193
+ return av > bv ;
194
+ }
195
+
176
196
/* 32 bit and 64 bit are very similar */
177
197
#include "sorttable.h"
178
198
#define SORTTABLE_64
Original file line number Diff line number Diff line change 23
23
#undef sort_mcount_loc
24
24
#undef elf_mcount_loc
25
25
#undef do_sort
26
- #undef Elf_Addr
27
26
#undef Elf_Ehdr
28
27
#undef Elf_Shdr
29
28
#undef Elf_Sym
38
37
# define sort_mcount_loc sort_mcount_loc_64
39
38
# define elf_mcount_loc elf_mcount_loc_64
40
39
# define do_sort do_sort_64
41
- # define Elf_Addr Elf64_Addr
42
40
# define Elf_Ehdr Elf64_Ehdr
43
41
# define Elf_Shdr Elf64_Shdr
44
42
# define Elf_Sym Elf64_Sym
52
50
# define sort_mcount_loc sort_mcount_loc_32
53
51
# define elf_mcount_loc elf_mcount_loc_32
54
52
# define do_sort do_sort_32
55
- # define Elf_Addr Elf32_Addr
56
53
# define Elf_Ehdr Elf32_Ehdr
57
54
# define Elf_Shdr Elf32_Shdr
58
55
# define Elf_Sym Elf32_Sym
@@ -160,17 +157,6 @@ static void *sort_orctable(void *arg)
160
157
}
161
158
#endif
162
159
163
- static int compare_extable (const void * a , const void * b )
164
- {
165
- Elf_Addr av = _r (a );
166
- Elf_Addr bv = _r (b );
167
-
168
- if (av < bv )
169
- return -1 ;
170
- if (av > bv )
171
- return 1 ;
172
- return 0 ;
173
- }
174
160
#ifdef MCOUNT_SORT_ENABLED
175
161
pthread_t mcount_sort_thread ;
176
162
You can’t perform that action at this time.
0 commit comments