aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/mm/extable.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/alpha/mm/extable.c b/arch/alpha/mm/extable.c
index 62dc379d301a..813c9b63c0e1 100644
--- a/arch/alpha/mm/extable.c
+++ b/arch/alpha/mm/extable.c
@@ -48,6 +48,27 @@ void sort_extable(struct exception_table_entry *start,
48 cmp_ex, swap_ex); 48 cmp_ex, swap_ex);
49} 49}
50 50
51#ifdef CONFIG_MODULES
52/*
53 * Any entry referring to the module init will be at the beginning or
54 * the end.
55 */
56void trim_init_extable(struct module *m)
57{
58 /*trim the beginning*/
59 while (m->num_exentries &&
60 within_module_init(ex_to_addr(&m->extable[0]), m)) {
61 m->extable++;
62 m->num_exentries--;
63 }
64 /*trim the end*/
65 while (m->num_exentries &&
66 within_module_init(ex_to_addr(&m->extable[m->num_exentries-1]),
67 m))
68 m->num_exentries--;
69}
70#endif /* CONFIG_MODULES */
71
51const struct exception_table_entry * 72const struct exception_table_entry *
52search_extable(const struct exception_table_entry *first, 73search_extable(const struct exception_table_entry *first,
53 const struct exception_table_entry *last, 74 const struct exception_table_entry *last,