diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-18 08:36:46 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-18 08:36:46 +0100 |
commit | 0107b3cf3225aed6ddde4fa8dbcd4ed643b34f4d (patch) | |
tree | 9b9337ae627fc56a0eda43c60860765f25efaa0b /arch/ia64/kernel/module.c | |
parent | 1c3f45ab2f7f879ea482501c83899505c31f7539 (diff) | |
parent | 9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/ia64/kernel/module.c')
-rw-r--r-- | arch/ia64/kernel/module.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index febc091c2f0..f1aca7cffd1 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c @@ -825,14 +825,16 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind * XXX Should have an arch-hook for running this after final section * addresses have been selected... */ - /* See if gp can cover the entire core module: */ - uint64_t gp = (uint64_t) mod->module_core + MAX_LTOFF / 2; - if (mod->core_size >= MAX_LTOFF) + uint64_t gp; + if (mod->core_size > MAX_LTOFF) /* * This takes advantage of fact that SHF_ARCH_SMALL gets allocated * at the end of the module. */ - gp = (uint64_t) mod->module_core + mod->core_size - MAX_LTOFF / 2; + gp = mod->core_size - MAX_LTOFF / 2; + else + gp = mod->core_size / 2; + gp = (uint64_t) mod->module_core + ((gp + 7) & -8); mod->arch.gp = gp; DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp); } |