]> git.baikalelectronics.ru Git - kernel.git/commit
modpost: fix extable entry size calculation.
authorQuentin Casasnovas <quentin.casasnovas@oracle.com>
Thu, 16 Apr 2015 03:35:36 +0000 (13:05 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 22 Apr 2015 08:01:32 +0000 (17:31 +0930)
commit493260cf5226a9b8f7878dd13f073065f40e4b9b
tree09f4b1b0db1513c75e46eeffd4369bd2f8021106
parent49318f45e551f705a2f4358086efa94ad504dc03
modpost: fix extable entry size calculation.

As Guenter pointed out, we were never really calculating the extable entry
size because the pointer arithmetic was simply wrong.  We want to check
we're handling the second relocation in __ex_table to infer an entry size,
but we were using (void*) pointers instead of Elf_Rel[a]* ones.

This fixes the problem by moving that check in the caller (since we can
deal with different types of relocations) and add is_second_extable_reloc()
to make the whole thing more readable.

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
scripts/mod/modpost.c