libname.assign(map_basename, 0, pos);
// strip the version suffix (matching regex "-[.0-9-]*$")
while (true) {
pos = libname.rfind('-');
libname.assign(map_basename, 0, pos);
// strip the version suffix (matching regex "-[.0-9-]*$")
while (true) {
pos = libname.rfind('-');