[PATCH openEuler-22.09 v2 175/391] libbpf: Tighten BTF type ID rewriting with error checking