Core-level binding-energy shifts, thermodynamic predictions, and morphologies for metal-Si and metal-Ge interfaces.