[llvm-bugs] [Bug 30218] New: ARMTargetInfo lacks an implementation of relaxTlsIeToLe()

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 31 00:34:27 PDT 2016


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

            Bug ID: 30218
           Summary: ARMTargetInfo lacks an implementation of
                    relaxTlsIeToLe()
           Product: lld
           Version: unspecified
          Hardware: Other
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: ed at 80386.nl
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

While trying to port CloudABI (https://nuxi.nl/) to target
armv6-unknown-cloudabi-eabihf, I noticed that LLD trunk crashes while trying to
create a statically linked executable that uses TLS:

#0  0x0000000805d653ca in thr_kill () from /lib/libc.so.7
#1  0x0000000805d653b6 in raise () from /lib/libc.so.7
#2  0x0000000805d65339 in abort () from /lib/libc.so.7
#3  0x0000000000941ed6 in llvm::llvm_unreachable_internal(char const*, char
const*, unsigned int) ()
#4  0x000000000084e049 in lld::elf::TargetInfo::relaxTlsIeToLe(unsigned char*,
unsigned int, unsigned long) const ()
#5  0x00000000005f226a in
lld::elf::InputSectionBase<llvm::object::ELFType<(llvm::support::endianness)1,
false> >::relocate(unsigned char*, unsigned char*) ()
#6  0x00000000005f84a7 in
lld::elf::InputSection<llvm::object::ELFType<(llvm::support::endianness)1,
false> >::writeTo(unsigned char*) ()
#7  0x00000000006eba32 in
lld::elf::OutputSection<llvm::object::ELFType<(llvm::support::endianness)1,
false> >::writeTo(unsigned char*) ()
#8  0x00000000008810f1 in (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, false>
>::writeSections() ()
#9  0x000000000085cc1d in (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, false>
>::run() ()
#10 0x0000000000886a1f in void
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1,
false> >() ()
#11 0x00000000005647da in void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
false> >(llvm::opt::InputArgList&) ()
#12 0x0000000000556bf9 in lld::elf::LinkerDriver::main(llvm::ArrayRef<char
const*>) ()
#13 0x00000000005561c6 in lld::elf::link(llvm::ArrayRef<char const*>,
llvm::raw_ostream&) ()
#14 0x000000000045b8fb in main ()

Looking through the code, I think that the problem is that r276095 introduced
ARMTargetInfo::isTlsInitialExecRel(), but did not add the necessary
relaxTlsIeToLe() function. Because I have absolutely no idea what I'm doing, I
thought I'd file a bug report.

-- 
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/20160831/ec9ee10e/attachment.html>


More information about the llvm-bugs mailing list