commit | d855157f94b9476883a28c154a5b351c64a1cba9 | [log] [tgz] |
---|---|---|
author | Fangrui Song <i@maskray.me> | Fri Nov 12 09:47:31 2021 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Nov 12 09:51:15 2021 -0800 |
tree | ac10003678d23218d10ba40cfdbec3735e1047da | |
parent | 5d007bf9de91d0592bdcffca80d68f6bae2bb255 [diff] |
[ELF] Make --no-relax disable R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX GOT optimization This brings back the original version of D81359. I have found several use cases now. * Unlike GNU ld, LLD's relocation processing is one pass. If we decide to optimize(relax) R_X86_64_{,REX_}GOTPCRELX, we will suppress GOT generation and cannot undo the decision later. Optimizing R_X86_64_REX_GOTPCRELX can usually make it easy to hit `relocation R_X86_64_REX_GOTPCRELX out of range` because the distance to GOT is usually shorter. Without --no-relax, the user has to recompile with `-Wa,-mrelax-relocations=no`. * The option would help during my investigationg of the root cause of https://git.kernel.org/linus/09e43968db40c33a73e9ddbfd937f46d5c334924 * There is need for relaxation for AArch64 & RISC-V. Implementing this for x86-64 improves consistency with little target-specific cost (two-line X86_64.cpp change). Reviewed By: alexander-shaposhnikov Differential Revision: https://reviews.llvm.org/D113615 GitOrigin-RevId: a05384dc8930cbe967def7c5c4113740838e8fd0
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.