Re: sdhci_pci.ko fails to load

From: Ian Lepore <ian_at_freebsd.org>
Date: Sun, 20 Mar 2016 18:54:55 -0600
On Sun, 2016-03-20 at 23:40 +0100, Jilles Tjoelker wrote:
> On Sun, Mar 20, 2016 at 04:05:34PM -0600, Ian Lepore wrote:
> > On Sun, 2016-03-20 at 22:33 +0100, Guido Falsi wrote:
> > > On 03/20/16 22:21, Guido Falsi wrote:
> > > > On 03/20/16 22:18, Conrad Meyer wrote:
> > > > > Try 'kldload mmc' first.  'sdhci_pci' is missing a
> > > > > MODULE_DEPEND
> > > > > on mmc.
> 
> > > > As I said, when loading sdhci_pci I had already loaded module
> > > > mmc.
> 
> > > > Anyway I'll try that again just to make sure, maybe I missed it
> > > > and
> > > > thought I had it loaded.
> 
> > > > I'll followup shortly.
> 
> > > I confirm that I had already loaded mmc.ko.
> 
> > [snip]
> > > the full error in dmesg is the same as stated before:
> 
> > > link_elf_obj: symbol mmc_driver undefined
> > > linker_load_file: Unsupported file type
> 
> > > Meybe the symbol is optimized out by the compiler in the module?
> 
> > I suspect this is caused by my r292180 back in December.  I'm
> > trying to
> > figure out if that's the case and if so, how to fix it.
> 
> I think this is caused by the missing MODULE_DEPEND. The kernel
> linker
> only looks for symbols in the ELF objects containing the module
> itself
> and its declared dependencies.
> 
> If mmc is compiled into the main kernel image, this is always
> satisfied.
> 

Thanks for the clue about the linker, it would have taken me forever to
figure that out by flailing around like I was doing.

Hopefully this is all fixed now with r297127, but I was only able to
test it on arm systems (I have no x86 with sdhci).

-- Ian
Received on Sun Mar 20 2016 - 23:56:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC