Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/share/mk
Module Name: src
Committed By: riastradh
Date: Wed Mar 20 13:50:37 UTC 2024
Modified Files:
src/share/mk: bsd.lib.mk
Log Message:
bsd.lib.mk: Check expected vs actual symbols at build-time.
If, for LIB=foo, you create a file foo.expsym, bsd.lib.mk will list
the dynamic symbols and their versions with
nm --dynamic --extern-only --defined-only --with-symbol-versions
and compare the names (not addresses or types) to foo.expsym. If
there are any differences, they will be printed and the build will
fail.
foo.expsym should be sorted with `LANG=C sort -u'.
This way, you can verify changes don't inadvertently add or remove
symbols. If you do want to add (or, if you're bumping the major,
remove) symbols, you can verify the changes and edit the foo.expsym
file accordingly. This will also help to enforce rules about symbol
changes on pullups in release branches.
Note that using a version map (-Wl,--version-script=...) doesn't
catch symbol removal -- ld quietly ignores symbols in the version map
that aren't actually defined by any object in the library. So this
supplements the version map.
Proposed on tech-userlevel:
https://mail-index.NetBSD.org/tech-userlevel/2024/03/16/msg014264.html
To generate a diff of this commit:
cvs rdiff -u -r1.394 -r1.395 src/share/mk/bsd.lib.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index