[PATCH 6.6 120/121] kbuild: Make ld-version.sh more robust against version string changes