[llvm-bugs] [Bug 42460] New: ELF dependent-library specifier to itself in an object file causes LLD to hang

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 1 03:57:09 PDT 2019


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

            Bug ID: 42460
           Summary: ELF dependent-library specifier to itself in an object
                    file causes LLD to hang
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: bd1976llvm at gmail.com
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

In the upstream review for ELF dependent-libraries it was decided that we only
need to support libraries being specified to LLD via the dependent-libraries
metadata and not object files. However, to keep the implementation simple, the
upstream code does allow object files to be specified.

The simplest problem is: if an object file has a dependent-library specifier to
itself the linker will loop forever (assuming that it does not fail with e.g.
multiply defined symbol errors). More generally, the linker will never finish
if there is a loop of dependent library specifiers in a set of object files(and
again that linking those object files multiple times does not cause the link to
fail for another reason).

I think this extremely unlikely to occur in real use cases as in normal use
linking the same object file twice will cause a linking error.

-- 
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/20190701/c546d8ad/attachment.html>


More information about the llvm-bugs mailing list