bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alpha linux: R_ALPHA_LITERAL relocation overflow


From: Mike Kasick
Subject: Re: alpha linux: R_ALPHA_LITERAL relocation overflow
Date: Fri, 9 Sep 2005 09:18:09 -0400
User-agent: Mutt/1.5.9i

On Fri, Sep 02, 2005 at 10:33:21AM +0100, Nick Clifton wrote:

> I suspect however that this might actually be a compiler problem, or 
> even a user problem.  What I think might be happening is that the 
> compiler is creating code that assumes that __divqu function will be 
> within the 16-bit offset available to the R_ALPHA_LITERAL and telling 
> the assembler to go ahead and generate the reloc.  Presumably this used 
> to be OK when the libafs library was smaller, but now that it has grown 
> this assumption is no longer true.

This turns out to be correct.  The assembly output from the compiler
confirms that the compiler explicitly specifies the use of the literal
relocation type.

As it turns out though, the whole issue is a red herring.  I checked the
size of the .got section of the loaded module, and it was 75K, beyond the
range that the literal relocation type can specify an offset (64K).  Thus,
all R_ALPHA_LITERAL relocated symbols fail, it just happens that __divqu is
the first symbol of that type.

Why is .got so large?  There's a kernel bug in Linux's alpha module loader
that inflates the got.  After applying the patch, the .got is only 8K and
everything is good:

http://www.ussg.iu.edu/hypermail/linux/kernel/0509.0/1342.html
http://www.ussg.iu.edu/hypermail/linux/kernel/0509.0/1362.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]