freebsd_wlan: Enable -fvisibility=hidden.

Reduces the size of WiFi drivers by a bit (and reduces the number
of symbols the kernel has to resolve within the binaries.)

Tested with realtekwifi, still works.
This commit is contained in:
Augustin Cavalier
2024-12-10 13:00:49 -05:00
parent cb3ddd18bb
commit 7f7ff2884f
@@ -16,12 +16,14 @@ SubDirC++Flags [ FDefines _KERNEL=1 FBSD_DRIVER=1 ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) .. crypto rijndael ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) .. crypto rijndael ] ;
# The reason we use a KernelMergeObject followed by KernelStaticLibrary # The reason we use a KernelMergeObject followed by KernelStaticLibrary is to
# instead of KernelStaticLibrary directly is to force all objects, # force all objects, not just the ones a driver links against, to be linked
# not just the ones the driver links against, to be linked into # into the final binary. Otherwise, certain objects which export no symbols
# the final binary. Otherwise, certain objects which export no symbols # besides SYSINIT() would not be linked at all, and in order for this module
# save SYSINIT() would not be linked at all, and in order for this # to function properly, they must be.
# module to function properly, they must be.
SubDirCcFlags -fvisibility=hidden ;
SubDirC++Flags -fvisibility=hidden ;
KernelMergeObject freebsd_wlan.o : KernelMergeObject freebsd_wlan.o :
ieee80211.c ieee80211.c
ieee80211_action.c ieee80211_action.c