Bug#539378: [hppa]: fails to load nfs module: Global Offset Table
Helge Deller <deller <at> gmx.de>
2009-07-31 23:45:30 GMT
On 08/01/2009 01:38 AM, Kyle McMartin wrote:
> On Fri, Jul 31, 2009 at 06:00:48PM -0400, Carlos O'Donell wrote:
>> On Fri, Jul 31, 2009 at 5:26 PM, John David
>> Anglin<dave <at> hiauly1.hia.nrc.ca> wrote:
>>> I don't have more details... The idea is as Carlos outlined. There's
>>> code in the binutils elf32-hppa.c and elf64-hppa.c files to implement
>>> the above for dynamic libraries. That's what made me think of it.
>> Binutils is not involved in the kernel module loader, instead
>> arch/parisc/kernel/module.c (get_fdesc) chooses where the gp will
>> point to.
>> If you set gp to the middle of the GOT table, *and* implement
>> long/short ldd access on 64-bit, then you would get a total of 8191
>> possible slots per module.
>> Personally I think the lower risk, quicker fix, is to implement a fix
>> for 64-bit kernels that uses ldd in format 3 for all offsets> 15
>> bytes, and thus allow you to set MAX_GOTS to 4095.
>> Note: ldd format 3 can't be used to load immediate values between 15
>> and -16 bytes.
> Is it as simple as:
> diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
> index ef5caf2..0502fab 100644
> --- a/arch/parisc/kernel/module.c
> +++ b/arch/parisc/kernel/module.c
> <at> <at> -82,13 +82,6 <at> <at>