patch-2.1.18 linux/arch/i386/mm/extable.c
Next file: linux/arch/m68k/amiga/ksyms.c
Previous file: linux/arch/i386/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Fri Dec 27 12:03:19 1996
- Orig file:
v2.1.17/linux/arch/i386/mm/extable.c
- Orig date:
Sun Nov 10 20:12:08 1996
diff -u --recursive --new-file v2.1.17/linux/arch/i386/mm/extable.c linux/arch/i386/mm/extable.c
@@ -14,11 +14,6 @@
const struct exception_table_entry *last,
unsigned long value)
{
- /* Some versions of the linker are buggy and do not align the
- __start pointer along with the section, thus we may be low. */
- if ((long)first & 3)
- (long)first = ((long)first | 3) + 1;
-
while (first <= last) {
const struct exception_table_entry *mid;
long diff;
@@ -39,25 +34,22 @@
search_exception_table(unsigned long addr)
{
unsigned long ret;
-#ifdef CONFIG_MODULES
- struct module *mp;
-#endif
- /* Search the kernel's table first. */
- ret = search_one_table(__start___ex_table,
- __stop___ex_table-1, addr);
- if (ret)
- return ret;
-
-#ifdef CONFIG_MODULES
+#ifndef CONFIG_MODULES
+ /* There is only the kernel to search. */
+ ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
+ if (ret) return ret;
+#else
+ /* The kernel is the last "module" -- no need to treat it special. */
+ struct module *mp;
for (mp = module_list; mp != NULL; mp = mp->next) {
- if (mp->exceptinfo.start != NULL) {
- ret = search_one_table(mp->exceptinfo.start,
- mp->exceptinfo.stop-1, addr);
- if (ret)
- return ret;
- }
+ if (mp->ex_table_start == NULL)
+ continue;
+ ret = search_one_table(mp->ex_table_start,
+ mp->ex_table_end - 1, addr);
+ if (ret) return ret;
}
#endif
+
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov