def METHOD_NAME(self, name):
    if name.startswith("kernel-") or name == "virtual/kernel":
        return name
    if name.startswith("rtld"):
        return name
    if name.endswith("-crosssdk"):
        return name
    if name.endswith("-" + self.extname):
        name = name.replace("-" + self.extname, "")
    if name.startswith("virtual/"):
        subs = name.split("/", 1)[1]
        if not subs.startswith(self.extname):
            return "virtual/" + self.extname + "-" + subs
        return name
    if name.startswith("/") or (name.startswith("${") and name.endswith("}")):
        return name
    if not name.startswith(self.extname):
        return self.extname + "-" + name
    return name