On 4/30/07, Shawn Bohrer <shawn.bohrer@xxxxxxxxx> wrote:
Hey everyone, I'm trying to build one of my companies internal test modules on the x86_64 architecture. The module is written in C++ so we do not use the kernel's build system. When I try to load the module I see the following error in the kernel prints: Overflow in relocation type 11 val FFFFFF00104c3688 module likely not compiled with -mcmodel=kernel Of course the problem is that I am compiling with -mcmodel=kernel and -mno-red-zone. Additionally I have built one other module using the same compile options and it loads fine. Am I missing some other compile options? Is there something wrong with the code?
Well I found the problem though I'm not sure how to fix it. The problem is that we define two symbols in our linker script and the linker doesn't know about the -mcmodel=kernel option. Is there some other way to do this in the linker script on 64-bit? .ctors 0 : { ___gNISSCtorStart___ = .; KEEP (*(SORT(.ctors.*))) KEEP (*(SORT(.ctors))) ___gNISSCtorEnd___ = .; } .dtors 0 : { ___gNISSDtorStart___ = .; KEEP (*(SORT(.dtors.*))) KEEP (*(SORT(.dtors))) ___gNISSDtorEnd___ = .; } Thanks, Shawn -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ