lkml.org 
[lkml]   [2010]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Error "Unknown relocation: 36" on module load on Sparc
On Tue, Jun 22, 2010 at 11:07:51PM +0400, Vladislav Bolkhovitin wrote:
>
> David Miller, on 06/17/2010 12:35 AM wrote:
>> From: Vladislav Bolkhovitin <vst@vlnb.net>
>>
>> You're building the module with incorrect compiler flags, in
>> particular somehow the "-mcmodel=medlow" option is not getting passed
>> into the module build and thus the wrong code model is being used to
>> build the module.
>>
> Thank you. This gives us the direction away from the current dead end.
> We will make the needed changes in our Makefiles.
>
> But we surprised that such platform specific compiler flags have to be
> manually maintained by out of the kernel tree modules developers. We
> thought kbuild environment doing it automatically. Particularly,
> Documentation/kbuild/modules.txt doesn't say anything about manual
> platform specific flags.

They should all be there automagically.
A few things to try out...
What machine is this being build on?

Your Makefile contains this:
> ifeq ($(KVER),)
> ifeq ($(KDIR),)
> KVER = $(shell uname -r)
> KDIR := /lib/modules/$(KVER)/build
> endif
> else
> KDIR := /lib/modules/$(KVER)/build
> endif
>

But does /lib/modules/... contain a sparc kernel?

You could try to build your module using: V=1

And reply with the output. This should give a clue about what flags are picked
up from where.

Most of your Makefile looks fine - I guess we need to find the bug
in the build environmnet and not in the Makefile.

Sam


\
 
 \ /
  Last update: 2010-06-22 21:37    [W:0.059 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site