Bug 215061 - COMPAT_LINUX32 in kernel with linux_enable causes undefined symbol on boot
Summary: COMPAT_LINUX32 in kernel with linux_enable causes undefined symbol on boot
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RELEASE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-emulation mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-05 04:30 UTC by xxjack12xx
Modified: 2019-02-09 05:10 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xxjack12xx 2016-12-05 04:30:16 UTC
When
options         COMPAT_LINUX32
is defined in the kernel and
linux_enable="YES"
in rc.conf, the system boots with this error:

link_elf_obj: symbol elf64_linux_vdso_fixup undefined
linker_load_file: Unsupported file type


When
options         COMPAT_LINUX32
is not defined in the kernel and linux_enable="YES" in rc.conf, the linux module loads fine.

Linux x86-64 ELF exec handler installed
Comment 1 Jeroen Ruigrok van der Werven freebsd_committer 2017-06-01 06:02:59 UTC
Actually, on 11-STABLE and not having any mention of COMPAT_LINUX or COMPAT_LINUX32 in my kernel, trying to kldload linux64.ko I still get this message in the logs:

% sudo kldload linux64
kldload: an error occurred while loading the module. Please check dmesg(8) for more details.
% dmesg | tail -2
link_elf_obj: symbol elf64_linux_vdso_fixup undefined
linker_load_file: Unsupported file type
% grep LINUX /usr/src/sys/amd64/conf/DEALER 
#options 	COMPAT_LINUX
Comment 2 Jeroen Ruigrok van der Werven freebsd_committer 2017-06-01 06:15:25 UTC
Rephrase my previous comment, looks like the kernel I was using had COMPAT_LINUX32 compiled in.

Rebuilding with the file shown from the grep allows one to kldload either linux.ko or linux64.ko successfully.

I'll check the documentation and see what can be adjusted there to save people from annoyance.
Comment 3 Jeroen Ruigrok van der Werven freebsd_committer 2017-06-01 06:16:12 UTC
For the record:

% uname -a
FreeBSD dealer 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE #7 r319368M: Thu Jun  1 08:01:01 CEST 2017     root@dealer:/usr/obj/usr/src/sys/DEALER  amd64

% kldstat | grep  lin
 5    1 0xffffffff8261f000 a887     linprocfs.ko
 6    2 0xffffffff8262a000 7afc     linux_common.ko
 7    1 0xffffffff82632000 3c7ff    linux64.ko