This is the first in a stack of diffs that repackages and revises D100835 for RISC-V linker relaxation.
This diff implements machinery to elide unwanted instruction bytes, and to rewrite NOP sequences that are optimal for code-alignment padding.
Caveat: this has not been tested with option --emit-relocs.
The name is unnecessarily the same as Writer::finalizeSections. relaxSections may be a better name.