[llvm-bugs] [Bug 36727] New: Add support for R_AARCH64_TLSLE_LDST8_TPREL_LO12 relocation.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 14 07:04:26 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36727

            Bug ID: 36727
           Summary: Add support for R_AARCH64_TLSLE_LDST8_TPREL_LO12
                    relocation.
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: peter.smith at linaro.org
                CC: llvm-bugs at lists.llvm.org

In https://reviews.llvm.org/D44355 an attempt was made to fold the sequence:

mrs x1, TPIDR_EL0
add x2, x1, :tprel_hi12:local_exec_var
add x3, x2, :tprel_lo12_nc:local_exec_var
ldr w0, [x3]

to:

mrs x1, TPIDR_EL0
add x2, x1, :tprel_hi12:local_exec_var
ldr w0, [x2, :tprel_lo12_nc:local_exec_var]

Which unfortunately had to be reverted for ELF because no ELF linker supported
the R_AARCH64_TLSLE_LDST8_TPREL_LO12 relocation that is needed for:
ldr w0, [x2, :tprel_lo12_nc:local_exec_var].

Existing ELF linkers only implement R_AARCH64_TLSLE_ADD_TPREL_LO12_NC to
support
add x3, x2, :tprel_lo12_nc:local_exec_var

It would be nice to implement this relocation to eventually enable this
relaxation to be done for ELF targets. This will take some time as support will
need to be added to the binutils linkers as well.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180314/bee132f3/attachment.html>


More information about the llvm-bugs mailing list