Thread (13 messages) 13 messages, 5 authors, 2009-08-07

Re: Relocation problem with MIPS kernel modules

From: David VomLehn <hidden>
Date: 2009-07-30 21:26:54

On Thu, Jul 30, 2009 at 12:15:42PM -0700, David Daney wrote:
David VomLehn wrote:
quoted
I have a MIPS loadable kernel module that, when I try to insmod it, causes the
kernel to emit the message:

	module xyz: dangerous relocation
...
quoted
So, who the heck knows what gcc and the linker are really generating and can
anyone suggest an algorithm for handling R_MIPS_HI16/R_MIPS_LO16 relocation
entries correctly?
Without seeing your object module I am guessing.

Q: What version of binutils and GCC are you using?

It is the assembler's responsibility to properly sort the relocations.  
Some versions of binutils have bugs in this area.  If you are not using  
2.19.1, I suggest that you upgrade.

Unless you are compiling with -fsection-anchors there should be pairs of  
R_MIPS_HI16/R_MIPS_LO16 relocations.
We are downrev in our tool set; I'll try a newer version. Thanks!
David Daney
David VomLehn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help