[PATCH] D47755: [RISCV] Insert R_RISCV_ALIGN relocation type and Nops for code alignment when linker relaxation enabled
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 24 07:13:42 PST 2019
asb added a comment.
In D47755#1362740 <https://reviews.llvm.org/D47755#1362740>, @shiva0217 wrote:
> Hi @asb, I got your point, we could guard the target hook with `AF.hasEmitNops()`, so the behavior of `.align 4, 1` will be the same as gnu assembler. What do you think?
That sounds good
> I've tested .align in data section when relaxation enabled for gnu toolchain, gnu toolchain will not insert R_RISCV_ALIGN, and the alignment position will be correct. It seems that we only need to insert R_RISCV_ALIGN for the relaxable section. As far as I know, it would be code section, but I may miss something.
gas seems to have a bug here, I've filed https://sourceware.org/bugzilla/show_bug.cgi?id=24129
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D47755/new/
https://reviews.llvm.org/D47755
More information about the llvm-commits
mailing list