Closed Bug 1256518 Opened 6 years ago Closed 5 years ago
Build a static library of the actual Free
BL, for unit testing
It would be useful to be able to write unit tests for parts of FreeBL that aren't directly exported. For other libraries (e.g., libssl or libnssutil) there's a corresponding static library that can be linked to to bypass the usual visibility/export restrictions. But lib/freebl builds a static library that's just loader.c, and one or more versions of libfreebl3.so (used for having subarchitecture-specific libraries on, e.g., SPARC) with a recursive invocation of the same makefile. There is currently no static library of the actual implementation. One possible alternative to building a static library somehow (e.g., making the loader stub its own lib/ subdirectory) would be to add an additional libfreebl3.so variant that doesn't use a version map file and instead exports everything. (See also bug 1243208.) Possibly useful somehow: NSPR's dynamic-loading wrapper has a feature for registering virtual libraries (with a fixed symbol table pointing to already-loaded code/data) which PR_LoadLibrary will “load” instead of using the actual dlopen.
We're doing this now with GYP for test builds, please see bug 1333361.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.