bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28040] New: libLLVM.so fails to link using LTO with ld.bfd + LLV


From: tbaeder at redhat dot com
Subject: [Bug ld/28040] New: libLLVM.so fails to link using LTO with ld.bfd + LLVMGold plugin
Date: Thu, 01 Jul 2021 13:14:14 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28040

            Bug ID: 28040
           Summary: libLLVM.so fails to link using LTO with ld.bfd +
                    LLVMGold plugin
           Product: binutils
           Version: 2.37 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: tbaeder at redhat dot com
  Target Milestone: ---

This is a forward of https://bugzilla.redhat.com/show_bug.cgi?id=1954375
and https://reviews.llvm.org/D104230

ld.bfd (or rather libbfd I think) creates tons of fds and passes them to the
claim_file() callback that ld plugins implement. This is the case for archives
as far as I can see.

ld does not close the fd after the claim_file() callback has been called when
the LLVM plugin is in use, but does close them when the gcc plugin is used
(there is a comment about this in ld/plugin.c.

Simply removing that comment and the surrounding if statement fixed the problem
for me. Explicitly calling release_input_file() in LLVM's claim_file
implementation also worked for me.

I don't have a smaller test case for this unfortunately.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]