[lld] [RISCV] Disable gp relaxation if part of object unreachable (PR #72655)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 06:35:19 PST 2023


nemanjai wrote:

> How does this discussion address my question on [#72405 (comment)](https://github.com/llvm/llvm-project/issues/72405#issuecomment-1817059887) ? I am not yet convinced that this is a linker problem.

I believe that @topperc has addressed that particular comment (i.e. the compiler checks the alignment of the object it is accessing). The address of an aligned object cannot reside in the range you mentioned (otherwise it would not be aligned).

This patch particularly addresses the issue where the object is aligned as required but GP is less aligned (since no requirement exists that GP be aligned).

https://github.com/llvm/llvm-project/pull/72655


More information about the llvm-commits mailing list