NetBSD Developer Documentation:Misc developer notes |
If some nugget of information is useful enough for NetBSD developers to know - list it here.
Just as a short reminder for those who are about to switch over their m68k port to ELF: the interpretation of the .align directive has changed in the m68k/ELF toolchain. While its argument is log2(alignment) on m68k/a.out, it is now linear; I've updated the ports which have already been switched to reflect this.
(This is also true for i386, but neither for ARM ("different" vs. log2) nor SPARC (both linear).)
foo
is the name of the library,
0
is the library's major number and 0
is the library's
minor number. A new library would normally have 0
for both the
major and minor number.
libfoo
directory in the CVS repository, using cvs add or cvs
import, depending on which is more appropriate e.g. due to
external maintenance of the product.
libfoo
subdirectory to the Makefile's SUBDIRS
list one level up in the hierarchy.
./usr/lib/libfoo.so.0.0
) to
src/distrib/sets/lists/base/shl.mi
.
./usr/lib/libfoo_pic.a
) to
src/distrib/sets/lists/comp/shl.mi
.
./usr/lib/libfoo.so
) and a single numeric suffix
(./usr/lib/libfoo.so.0
) to
src/distrib/sets/lists/base/shl.elf
.
./usr/libdata/lint/llib-lfoo.ln
) to
src/distrib/sets/lists/comp/lint.mi
.
./usr/lib/libfoo.a
),
profiled library (./usr/lib/libfoo_p.a
)
and any headers and manual pages to
src/distrib/sets/lists/comp/mi
.
LIBFOO?= ${DESTDIR}/usr/lib/libfoo.a
src/share/mk/bsd.prog.mk
and to the DPADD
section of src/share/mk/bsd.README
.
FOO
to the
__bsd_prog_mk_system_libs
variable in
src/share/mk/bsd.hostprog.mk
.
.if "\\$1"libfoo" \&Foo Library (libfoo,
-lfoo)
src/share/tmac/doc2html
.
.Lb libfoo
macro in
src/share/tmac/doc-syms
.
$NetBSD$
RCS
Ids.
The major number should be incremented and the minor set to zero when an externally visible structure changed size, or function changed arguments. This can cause significant disruption and version renaming is frequently used to avoid this.
With the current C ABIs changing functions (previously void) to return a value of either integer, pointer, or floating-point type does not necessitate incrementing the major number since return values are always passed in (unconditionally) caller-saved registers. In such a case the minor number should be incremented to note the "additions".
If you bump the major of a library, you should:
I'd like to mention for future reference, that our syscall argument passing mechanism does not handle passing structs or unions properly on all architectures, so syscall implementors need to convert those to pointers and provide stubs in userland that &struct or &union before calling the kernel stub.
src/distrib/sets/lists/man/mi
.
At periodic intervals, I find that my checked out tree gets filled with garbage that cvs update normally doesn't "?" because it is in the ignored list -- stuff like .orig files from patching runs or .o files for things that don't exist any more. Since CVS ignores them, one never finds out one's tree has the junk in it.
I'm sure I'm the last person to discover this trick, but in case I'm not, I have found that doing
cvs update -I \! -I CVS
nicely yields lots of good complaints about left-over garbage like this.
The weak symbol reference has two goals:
In the case of moderated lists (-announce, -news) you need to make sure the postings match the charter of the list(s) and approve them if they are appropriate, or reply to the author and explain why you can't approve their postings.
You'll also get keyword bounces which are usually spam (that you have to read) and if they're legitimate postings, determine where the keyword match was and decide whether it was legitimate and forward it. If not, communicate back to the author to ask him/her to rephrase their posting.
The above task becomes fairly onerous during virus season.
|
|