Linker relaxation may change code size. We need to fix up the alignment of alignment directive in text section by inserting Nops and R_RISCV_ALIGN relocation type. So then linker could satisfy the alignment by removing Nops.
To do this:
- Add shouldInsertExtraNopBytesForCodeAlign target hook to calculate the Nops we need to insert.
- Add shouldInsertFixupForCodeAlign target hook to insert R_RISCV_ALIGN fixup type.
How about: "Hook to check if extra nop bytes must be inserted for alignment directive. For some targets this may be necessary in order to support linker relaxation. The number of bytes to insert are returned in Size."