Bug 230009 - [patch] [ipfw_pmod] support module build outside of kernel build environment for VIMAGE-enabled kernel
Summary: [patch] [ipfw_pmod] support module build outside of kernel build environment ...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Andrey V. Elsukov
URL:
Keywords: easy, patch-ready
Depends on:
Blocks:
 
Reported: 2018-07-24 10:57 UTC by Eugene Grosbein
Modified: 2018-11-26 18:00 UTC (History)
2 users (show)

See Also:
eugen: mfc-stable12?
eugen: mfc-stable11?


Attachments
proposed fix (1.03 KB, patch)
2018-07-24 10:57 UTC, Eugene Grosbein
no flags Details | Diff
Enable VIMAGE by default (5.17 KB, patch)
2018-08-13 11:56 UTC, Andrey V. Elsukov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer 2018-07-24 10:57:00 UTC
Created attachment 195415 [details]
proposed fix

Let's "make VIMAGE=yes" in sys/modules/ipfw_pmod/ build VIMAGE-enabled kernel module. Now it builds without errors but does not kldload with an error: 

link_elf_obj: symbol layer3_chain undefined

Attached patch fixes this.
Comment 1 Andrey V. Elsukov freebsd_committer 2018-08-13 09:11:31 UTC
I think this problem should be solved in general, because not only ipfw modules are affected with this.
Comment 2 Marek Zarychta 2018-08-13 11:10:46 UTC
(In reply to Andrey V. Elsukov from comment #1)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228854
Comment 3 Andrey V. Elsukov freebsd_committer 2018-08-13 11:56:11 UTC
Created attachment 196154 [details]
Enable VIMAGE by default

What about something like this? Untested yet.
Comment 4 Eugene Grosbein freebsd_committer 2018-08-13 12:48:06 UTC
(In reply to Andrey V. Elsukov from comment #3)

Looks good.
Comment 5 Marek Zarychta 2018-08-13 13:28:17 UTC
(In reply to Eugene Grosbein from comment #4)

Sorry for unintentionally adding comment 2, this issue/fix is probably irrelevant to bug 228854, which doesn't appear to be much serious. 

BTW 11-STABLE patched with this ae@ fix builds fine both with and without options VIMAGE.
Comment 6 Eugene Grosbein freebsd_committer 2018-11-26 18:00:34 UTC
Hi!

Just notifying of awaiting PR. FreeBSD12 is affected too.