Skip to contentSkip to conversation

INSMOD failing on MIPS

DISCUSSION Jon Burgess 2 participants 2 messages Jan 28, 2002 MIPS

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines

But when i link two '.o' files with ld as
"mipsel-linux-ld -r -o temp.o temp.o temp1.o"
and insert the output 'temp.o' it is crashing.

I've seen this before, I think the solution is to use:

mipsel-linux-ld -G 0 -r -o temp.o temp.o temp1.o

Without the '-G0' the linker places small common variables into a '.scommon' section which insmod fails to relocate.

'insmod' should complain in this situation or try to relocate these symbols properly.

Jon Burgess

#1 lore raw

Hi Jon,

Thankyou very much for your quick reply.
And it worked with your suggestion of adding "-G 0" for linking also.

Thanks,
--Rajesh

Quoted 19 lines · Jon Burgess
Quoted 5 lines

But when i link two '.o' files with ld as
"mipsel-linux-ld -r -o temp.o temp.o temp1.o"
and insert the output 'temp.o' it is crashing.

I've seen this before, I think the solution is to use:

mipsel-linux-ld -G 0 -r -o temp.o temp.o temp1.o

Without the '-G0' the linker places small common variables into a '.scommon' section which insmod fails to relocate.

'insmod' should complain in this situation or try to relocate these symbols properly.

Jon Burgess