[Bug 239194] gcov-enabled kernel can't load modules

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jul 14 02:22:34 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239194

            Bug ID: 239194
           Summary: gcov-enabled kernel can't load modules
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: asomers at FreeBSD.org

The gcov support added to the kernel in r344487 doesn't work with modules. 
Everything seems to be working for the kernel itself, but when I try to load a
module I get this error:

> sudo kldload fdescfs
kldload: an error occurred while loading module fdescfs. Please check dmesg(8)
for more details.
> tail -n2 /var/log/messages
Jul 13 20:14:08 fbsd-head kernel: kldload: fdescfs.ko: lost base for reltab
Jul 13 20:14:08 fbsd-head kernel: linker_load_file: /boot/kernel.old/fdescfs.ko
- unsupported file type

I don't observe the kldload failure when I build a GENERIC kernel using the
amd64-gcc cross toolchain.  I only see it when using the GCOV kernel.  If I cd
to /usr/src/sys/modules/whatever and build the module there, then I _can_ load
it.  However, coverage data is not collected.

> sudo kldload /boot/modules/fusefs.ko
> uname -a
FreeBSD fbsd-head.lauralan.noip.me 13.0-CURRENT FreeBSD 13.0-CURRENT r349977
GCOV  amd64
> cat sys/amd64/conf/GCOV 
include GENERIC
ident   GCOV
options LINDEBUGFS
options GCOV

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list