kldload: Unsupported file type

John Baldwin jhb at freebsd.org
Thu Jan 31 04:16:10 PST 2008

On Thursday 31 January 2008 12:28:02 am Bruce M Simpson wrote:
> John Baldwin wrote:
> >>> It is printed whenever a kernel module is loaded.
> >>> The modules load OK. Nothing special or different about them.
> >>>
> >>>       
> ...
> > The kernel is a link_elf type object I believe, so you have to have it.
> >
> >   
> That follows (I was reading this the other day 'cause we don't support 
> weak ELF symbols in the kernel for C++) however, why is the message 
> being triggered now?
> Could it be ET_REL ?
> There have been no major changes to linking for the 6.3 buildkernel 
> target IIRC.
> BTW only my amd64 system appears to be affected.

The problem is that .ko's on amd64 are handled by link_elf_obj.c and not 
link_elf.c, thus if link_elf.c is first in the list of linker file handlers, 
then every .ko on amd64 is first going to try link_elf.c which fails and 
emits the error and then get loaded successfully by link_elf_obj.c.  Probably 
what should happen is that the linker error message should be cached somehow 
and only print out the last error if the overall load fails.

John Baldwin

More information about the freebsd-stable mailing list