MIPS .reginfo and .MIPS.options sections are consumed by the linker, and the linker produces a single output section. But it is possible that input files contain section symbol points to the corresponding input section. In case of generation a relocatable output we need to write such symbols to the output file.
Fixes bug 27878.
Please use fatal instead of assert because this can be triggered by a broken user input. (use assert only for programmer's (i.e. our) errors.)