Indemnification is the promise underlying a hold harmless clause: the sub agrees to make the GC whole for losses tied to the sub's work, including defense costs and settlements. It is the contractual half of risk transfer.
Indemnity is only as good as the indemnitor's ability to pay, which is why GCs back contractual indemnification with insurance requirements like additional insured status and adequate limits.