X-Git-Url: http://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=blobdiff_plain;f=arch%2Falpha%2Fmm%2Fextable.c;h=813c9b63c0e17de3577b5924b54072ad382244d9;hp=62dc379d301af9f1f00e824a2088eb487f77f39f;hb=ad6561dffa17f17bb68d7207d422c26c381c4313;hpb=c398df30d5caad626ac72bfab0361a7b0f67a661 diff --git a/arch/alpha/mm/extable.c b/arch/alpha/mm/extable.c index 62dc379..813c9b6 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, cmp_ex, swap_ex); } +#ifdef CONFIG_MODULES +/* + * Any entry referring to the module init will be at the beginning or + * the end. + */ +void trim_init_extable(struct module *m) +{ + /*trim the beginning*/ + while (m->num_exentries && + within_module_init(ex_to_addr(&m->extable[0]), m)) { + m->extable++; + m->num_exentries--; + } + /*trim the end*/ + while (m->num_exentries && + within_module_init(ex_to_addr(&m->extable[m->num_exentries-1]), + m)) + m->num_exentries--; +} +#endif /* CONFIG_MODULES */ + const struct exception_table_entry * search_extable(const struct exception_table_entry *first, const struct exception_table_entry *last,