kldload issue: "Exec format error" with amd64 FreeBSD

Yong Rao yrao at force10networks.com
Fri Aug 10 19:49:24 UTC 2007



I am porting a device driver from 32 bit FreeBSD OS (6.2) to amd64

The compiling passed without any problem. But while I do kldload the
module, we got problem.


kldload: can't load ./pnicdrv.ko: Exec format error


the dmesg displayed


kldload: Unsupported file type

kldload: unexpected relocation type 7

link_elf: symbol strcpy undefined


What the problem is?


In the compiling option we added extra "-m64 -fPIC ...". What particular
options/flags else we should add in?

Is there example makefile(device driver code set) we can refer to?


Thanks a lot,


Yong Rao

Force10 networks Inc

San Jose, CA


408 571 3617



More information about the freebsd-amd64 mailing list