[PATCH] D44485: [MC] Always emit relocations for same-section function references
Jameson Nash via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 10:11:23 PDT 2020
vtjnash added a comment.
We emit an offset table of the form:
ptrdiff_t symbol_offset = &f2 - &f1;
since we know this should normally be folded to a constant in the object file. This is normally rejected by a C compiler ("error: initializer element is not a compile-time constant", pointing to the `f2` symbol) but LLVM accepts it. It used to be handled here (since the difference //is// a constant known here), though it seems the mingw-w64 linker later corrupts this expression.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D44485/new/
https://reviews.llvm.org/D44485
More information about the llvm-commits
mailing list