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: unassignedb...@nondot.org
          Reporter: bd1976l...@gmail.com
                CC: llvm-bugs@lists.llvm.org, peter.sm...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to