lint, so this is turned off by default. Setting WANT_LINT will turn
on generation of lint libraries for /usr/libdata/lint/*.ln.
Reviewd by: silence in -audit.
defined, no symbols are exported from the module. This is
the typical configuration for most device drivers and
standalone modules; only infrastructure modules or those with
special requirements typically need to export symbols.
Don't print the objcopy commands as they are run when converting
symbols; they're bulky and annoying in many cases.
simplifying the module linking process and eliminating the risks
associated with doubly-defined variables.
Cases where commons were legitimately used (detection of
compiled-in subsystems) have been converted to use sysinits, and
any new code should use this or an equivalent practice as a
matter of course.
Modules can override this behaviour by substituting -fno-common
out of ${CFLAGS} in cases where commons are necessary
(eg. third-party object modules). Commons will be resolved and
allocated space when the kld is linked as part of the module
build process, so they will not pose a risk to the kernel or
other modules.
Provide a mechanism for controlling the export of symbols from
the module namespace. The EXPORT_SYMS variable may be set in the
Makefile to NO (export no symbols), a list of symbols to export,
or the name of a file containing a newline-seperated list of
symbols to be exported. Non-exported symbols are converted to
local symbols. If EXPORT_SYMS is not set, all global symbols are
currently exported. This behaviour is expected to change (to
exporting no symbols) once modules have been converted.
Reviewed by: peter (in principle)
Obtained from: green (kmod_syms.awk)
Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.
Approved by: a week of silence on -arch
MFC after: 2 weeks
"./foo.ko". Use "/full/path/foo.ko" instead so that when the path is
reported as being an absolute path to the "shared library", at least
it's not really a relative path.
Obtained from: LOMAC/FreeBSD project
debugging support as well. Debugging module support is handled
identically to kernel debugging support, right down to poor
choice of make variable names.
directory does not exist, instead of creating/overwriting a file
with the name of the (expected) directory. Yes, this deviates a bit
from nearly all other install targets in the tree, but let's face it,
removing a modules directory is not all that uncommon a mistake,
and finding a file with the contents of the last module installed
is a baaad surprise at boot time..
PR: 26317
Submitted by: "T. William Wells" <bill@twwells.com> (the PR)
Gregory Bond <gnb@itga.com.au> (the actual patch)
Reviewed by: silence on -arch and -audit for the last 10 days
MFC after: 2 weeks
Replace the a.out emulation of 'struct linker_set' with something
a little more flexible. <sys/linker_set.h> now provides macros for
accessing elements and completely hides the implementation.
The linker_set.h macros have been on the back burner in various
forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()),
John Polstra (ELF clue) and myself (cleaned up API and the conversion
of the rest of the kernel to use it).
The macros declare a strongly typed set. They return elements with the
type that you declare the set with, rather than a generic void *.
For ELF, we use the magic ld symbols (__start_<setname> and
__stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the
trick about how to force ld to provide them for kld's.
For a.out, we use the old linker_set struct.
NOTE: the item lists are no longer null terminated. This is why
the code impact is high in certain areas.
The runtime linker has a new method to find the linker set
boundaries depending on which backend format is in use.
linker sets are still module/kld unfriendly and should never be used
for anything that may be modular one day.
Reviewed by: eivind
We are way too inconsistent with our setting of the "schg" flag, and in
our default install, it doesn't really offer any additional security.
Reviewed by: arch@
Add simple "xlat" converter which performs 8to8 table based conversion.
Unicode converter will be added in the near future.
Reviewed by: silence on arch@
Files placement reviewed by: bde
Obtained from: smbfs
o Use objdump instead of gensetdefs(1) to build the linker sets.
o Allow overriding of nm and objdump in resp. genassym.sh and
gensetdefs.pl for non-native toolchains.
Reviewed by: arch
Perl improvements: Jos Backus <josb@cncdsl.com>, benno
this gives us several benefits, including:
* easier extensibility- new optional methods can be added to
ac97/mixer/channel classes without having to fixup every driver.
* forward compatibility for drivers, provided no new mandatory methods are
added.
.PATH to ${.CURDIR}/[...]/kern , the "exists" expression will fail for the
form exists(${.CURDIR}/[...]/kern/). This appears to be happening because
make is searching for the argument to "exists" by using .PATH rather than a
relative search, because .PATH and the argument match at the beginning.
Additionally, make appears to consider a path that starts with ${.CURDIR}
as relative, even though it expands to an absolute path.
The reason that most people aren't seeing this problem is that the absolute
paths of /usr/src/sys and /sys are also searched, so as long as the kernel
source can be found in at least one of those places, no problems surface.
This problem was inadvertently introduced on 1 December 2000, with the
addition of the sysvipc modules.
via the MODULE_VERSION() and MODULE_DEPEND() macros that both the loader
and kld system know how to deal with. The old DT_NEEDED tag is still
supported by the loader (and will remain supported for a while) - but the
kernel side presently doesn't know how to deal with DT_NEEDED.
do not have the kernel you wish to compile against in either
/usr/src/sys or /sys, then you will need to set SYSDIR to point to the
sys directory of the source tree that contians the source.
Also, minor tweaks to the load/unload targets from Bruce.
I've had this through several make worlds, as well as using it on a
daily basis for the past couple of weeks to build modules needed for
testing at Timing Solutions.
Reviewed and revised by: bde
Work sponsored by: Timing Solutions
it into a ``shared'' .ko file. This intermediate file can be directly
linked into a static kernel. This isn't all that useful yet but will
become much more interesting shortly.
essentially as in kernel makefiles, so that module sources can include
<stddef.h> and other standard headers. Only add the second path when
the first path can't be found, instead of when DESTDIR is defined.
Adding it used to be just an obfuscation.
Use "${.OBJDIR}" instyead of "." in -I paths. Using "${.OBJDIR}" just
gave more verbose command lines and depend files.
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.
we use. The .c half is statically compiled into the kernel. It's kinda
silly to generate a .h file on the fly that has inlines to call the
.c stuff when the .c code is fixed.
Also, zap the special treatment for VFS_KLD modules. This treatment
applies to lots of things, not just VFS's.
files (opt_*.h) automatically (if they are in ${SRCS}).
Clean vnode_if.[ch] automatically (if one of them is in ${SRCS}, not just
if VFS_KLD is defined).
There are some complications to avoid using the "@" symlink before it
is built.
2) s/MODLOAD/KMODLOAD/ to be consistent with the rest of the variables
(KMOD, KMODOWN, KMODGRP, etc) and definition of MODLOAD/UNLOAD in the
Makefile of the ATAPI module
3) textual fixups