Page MenuHomeFreeBSD

libusb: version symbols
Needs ReviewPublic

Authored by emaste on Mar 6 2026, 8:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 16, 12:35 PM
Unknown Object (File)
Sun, Jun 14, 12:28 PM
Unknown Object (File)
Sun, May 31, 9:59 PM
Unknown Object (File)
Wed, May 27, 5:31 AM
Unknown Object (File)
Tue, May 26, 3:01 AM
Unknown Object (File)
May 7 2026, 2:23 AM
Unknown Object (File)
May 3 2026, 10:30 AM
Unknown Object (File)
Apr 28 2026, 7:00 AM
Subscribers

Details

Reviewers
bapt
aokblast
Group Reviewers
USB

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71220
Build 68103: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Mar 6 2026, 8:09 AM

Adding symbol versions to the library changes the library ABI. This requires the (final) bump of the dso version.

Our rtld has a feature that in theory makes the bump not strictly necessary, but it is recommended anyway, because it improves forward-compatibility by avoiding very confusing error message from rtld when newly linked binary is used with old library without versioning.

lib/libusb/Symbol.map
3

You are mixing the raw linker version script syntax there, with our pre-processed Symbol.map. There is no need in the scope specifiers.

251

All symbols not explicitly listed in the Symbol.map with FreeBSD syntax, are automatically localized AKA not exported.

There are some additions after this patch was created, e.g. ff46acfd521e7b7b3761a395c8fa0a929e49e5d7 added libusb20_dev_attach_kernel_driver

AFAICT these are the candidates for additions to the list:
261002908ffd libusb: Add libusb_endpoint_transfer_type enum
ff46acfd521e usb: implement attach kernel driver feature
ae489991d1c0 libusb: implement IAD parser
2879c818e553 libusb: implement libusb_set_option
964823a18e11 libusb: implement libusb_get_max_alt_packet_size
d84b639a684e libusb: implement zlp flag in libusb transfer
1a8701e2e9a9 libusb: Implement libusb20_tr_get_flags
25c225106475 libusb: Implement libusb_set_log_cb

emaste edited reviewers, added: bapt; removed: emaste.
emaste added a reviewer: aokblast.

Incorporate feedback from @kib, add new symbols since review was originally created, use SYMBOL_MAPS.
Still TODO: bump shlib version.