This fixes PR36367 which is about segfault when --emit-relocs is
used together with .eh_frame sections.
That happens because we reorder .eh_frame sections and corresponding
.rela.eh_frame sections when combining .eh_frames.
Usually, objects do not do that and we error out on such objects (I added the test case),
so the situation with .eh_frame is unique.
The patch fixes it.
This is a useful invariant. Could we do this even when Config->EmitRelocs is false?