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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to