diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-09-05 07:26:11 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-09-26 09:45:10 -0400 |
commit | eb608fb366de123a97227437e5306f731f4a63c5 (patch) | |
tree | 6466e9b0bcd942457e0aa251af48816e3e925d90 /scripts | |
parent | 24996edce547fd981c089db9a12717fd76a51160 (diff) |
s390/exceptions: switch to relative exception table entries
This is the s390 port of 70627654 "x86, extable: Switch to relative
exception table entries".
Reduces the size of our exception tables by 50% on 64 bit builds.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/sortextable.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/sortextable.c b/scripts/sortextable.c index 6acf83449105..f19ddc47304c 100644 --- a/scripts/sortextable.c +++ b/scripts/sortextable.c | |||
@@ -161,7 +161,7 @@ typedef void (*table_sort_t)(char *, int); | |||
161 | #define SORTEXTABLE_64 | 161 | #define SORTEXTABLE_64 |
162 | #include "sortextable.h" | 162 | #include "sortextable.h" |
163 | 163 | ||
164 | static int compare_x86_table(const void *a, const void *b) | 164 | static int compare_relative_table(const void *a, const void *b) |
165 | { | 165 | { |
166 | int32_t av = (int32_t)r(a); | 166 | int32_t av = (int32_t)r(a); |
167 | int32_t bv = (int32_t)r(b); | 167 | int32_t bv = (int32_t)r(b); |
@@ -173,7 +173,7 @@ static int compare_x86_table(const void *a, const void *b) | |||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
176 | static void sort_x86_table(char *extab_image, int image_size) | 176 | static void sort_relative_table(char *extab_image, int image_size) |
177 | { | 177 | { |
178 | int i; | 178 | int i; |
179 | 179 | ||
@@ -188,7 +188,7 @@ static void sort_x86_table(char *extab_image, int image_size) | |||
188 | i += 4; | 188 | i += 4; |
189 | } | 189 | } |
190 | 190 | ||
191 | qsort(extab_image, image_size / 8, 8, compare_x86_table); | 191 | qsort(extab_image, image_size / 8, 8, compare_relative_table); |
192 | 192 | ||
193 | /* Now denormalize. */ | 193 | /* Now denormalize. */ |
194 | i = 0; | 194 | i = 0; |
@@ -245,9 +245,9 @@ do_file(char const *const fname) | |||
245 | break; | 245 | break; |
246 | case EM_386: | 246 | case EM_386: |
247 | case EM_X86_64: | 247 | case EM_X86_64: |
248 | custom_sort = sort_x86_table; | ||
249 | break; | ||
250 | case EM_S390: | 248 | case EM_S390: |
249 | custom_sort = sort_relative_table; | ||
250 | break; | ||
251 | case EM_MIPS: | 251 | case EM_MIPS: |
252 | break; | 252 | break; |
253 | } /* end switch */ | 253 | } /* end switch */ |