[all-commits] [llvm/llvm-project] f3c4da: [ELF] -no-pie: don't optimize addq R_X86_64_REX_GO...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jun 20 20:52:30 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f3c4dae6f2c44f1a7f130c4cf4b2861b62402b48
https://github.com/llvm/llvm-project/commit/f3c4dae6f2c44f1a7f130c4cf4b2861b62402b48
Author: Fangrui Song <i at maskray.me>
Date: 2024-06-20 (Thu, 20 Jun 2024)
Changed paths:
M lld/ELF/Arch/X86_64.cpp
M lld/test/ELF/x86-64-gotpc-relax-too-far.s
Log Message:
-----------
[ELF] -no-pie: don't optimize addq R_X86_64_REX_GOTPCRELX when !isInt<32>(va)
When `!isInt<32>(x.va)`, `addq x at GOTPCREL(%rip), %rax` (possibly due to
getelementptr of a global variable) should not be optimized to
`addq offset, %rax`. We currently have either an assertion failure or an
incorrect optimization.
Fix it using the relaxOnce framework.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list