[PATCH] D101773: [MC][ELF] Work around R_MIPS_LO16 relocation handling problem

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 14:58:00 PDT 2021


jrtc27 added a comment.

In Debian we were seeing mipsel's stage2 LLVM 12 emitting nonsense textual IR like `call void @llvm.memcpy.00G8.00G8.G32(i8* align 1 %3, i8* align 1 %4, i32 0, i1 false)` (se and `%0 = tail call float @llvm.nearbyint.toH(float %a)` (see https://github.com/rust-lang/rust/issues/85562 / https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988965), but also other another build saw different nonsense, but with each build being deterministic in what it would produce. Cherry-picking this patch seems to have fixed that. I don't know whether this is LLVM not emitting the correct HI16/LO16 pair (both in terms of the addends and in terms of being adjacent) for llvm/lib/IR/Function.cpp's string constant pointers or whether there's a bug in GNU ld where it silently does the wrong thing, but either way this does more than just work around an LLD deficiency.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101773



More information about the llvm-commits mailing list