[PATCH] D63404: [RISCV] Don't force absolute FK_Data_X fixups to relocs

Edward Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 09:01:53 PDT 2019


edward-jones added a comment.

I realize that I hadn't associated this change with D61584 <https://reviews.llvm.org/D61584>

Normally you would get a R_RISCV_{ADD,SUB}{32,64} for the difference expression in the test case, however with the changes in D61584 <https://reviews.llvm.org/D61584> a difference expression in .data will instead be folded (by MCExpr.cpp: EvaluateSymbolicAdd) to a FK_Data_{4,8} fixup which this change can then collapse to a constant value.

At the start of a CIE in .eh_frame there is a difference expression which expresses the length of the CIE. Before D61584 <https://reviews.llvm.org/D61584> and this change the length field would end up zeroed with a R_RISCV_{32,64} or R_RISCV_{ADD,SUB}{32,64} relocation. This posed a problem because the linker parses the .eh_frame section ignoring the relocations, and the zero length would cause the parsing to error out.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63404/new/

https://reviews.llvm.org/D63404





More information about the llvm-commits mailing list