From: Ivan Kokshaysky Larger modules fail to load with the message "Relocation overflow vs section 17", or some other section number. This failure happens with GPRELHIGH relocation, which is *signed* short, but relocation overflow check in module.c doesn't take into account the sign extension. --- arch/alpha/kernel/module.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/alpha/kernel/module.c~alpha-module-relocation-overflow-fix arch/alpha/kernel/module.c --- 25/arch/alpha/kernel/module.c~alpha-module-relocation-overflow-fix 2004-01-08 10:21:39.000000000 -0800 +++ 25-akpm/arch/alpha/kernel/module.c 2004-01-08 10:21:39.000000000 -0800 @@ -259,7 +259,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs, *(u64 *)location = value; break; case R_ALPHA_GPRELHIGH: - value = (value - gp + 0x8000) >> 16; + value = (long)(value - gp + 0x8000) >> 16; if ((short) value != value) goto reloc_overflow; *(u16 *)location = value; _