[PATCH] D146215: [BOLT] Reject symbols pointing to section end
Job Noorman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 18 02:07:38 PDT 2023
jobnoorman added a comment.
In D146215#4202973 <https://reviews.llvm.org/D146215#4202973>, @rafauler wrote:
> Makes sense, but where did you see this in practice?
This happens when using the RISC-V GNU toolchain in debug mode and emitting relocations:
$ cat test.c
int main() {}
$ riscv64-linux-gnu-gcc -g -Wl,--no-relax,--emit-relocs -o test test.c
$ readelf -s test | grep etext
73: 000000000000064a 0 NOTYPE LOCAL DEFAULT 12 .Letext0
In D146215#4203049 <https://reviews.llvm.org/D146215#4203049>, @yota9 wrote:
> LGTM, but small nit - I would swap this new condition with the " if (!Section->isText()) " condition above, since this one is more "univesal" and might appear not inly in text section. And although currently it does not really matter it probably better from the logical standpoint.
Makes sense, done!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146215/new/
https://reviews.llvm.org/D146215
More information about the llvm-commits
mailing list