[lld] [lld/ELF][X86] Respect outSecOff when checking if GOTPCREL can be relaxed (PR #86334)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 13:44:17 PDT 2024


================
@@ -47,6 +50,13 @@ SECTIONS {
   data 0x80200000 : { *(data) }
 }
 #--- lds2
+SECTIONS {
+  .text.foo 0x100000 : { *(.text.foo) }
----------------
MaskRay wrote:

Using a linker script to achieve the goal is too complex.
Use two input sections instead? The second input contains relocations while the first is for padding.

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


More information about the llvm-commits mailing list