This is highly reminiscent of work I was exposed to in grad school on recombining library versions from different binary distributions in an attempt to diversify the attack surface of a system, but at a much more granular level:
https://people.scs.carleton.ca/~soma/pubs/bfoster-gecco-2010...