We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 567d304 commit 5c4a630Copy full SHA for 5c4a630
lld/ELF/Arch/LoongArch.cpp
@@ -679,8 +679,8 @@ static bool relax(InputSection &sec) {
679
case R_LARCH_ALIGN: {
680
const uint64_t addend =
681
r.sym->isUndefined() ? Log2_64(r.addend) + 1 : r.addend;
682
- const uint64_t allBytes = (1 << (addend & 0xff)) - 4;
683
- const uint64_t align = 1 << (addend & 0xff);
+ const uint64_t allBytes = (1ULL << (addend & 0xff)) - 4;
+ const uint64_t align = 1ULL << (addend & 0xff);
684
const uint64_t maxBytes = addend >> 8;
685
const uint64_t off = loc & (align - 1);
686
const uint64_t curBytes = off == 0 ? 0 : align - off;
0 commit comments