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

            Bug ID: 34631
           Summary: ld behavior vs other linkers in a specific test case
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: toolybird at tuta dot io
  Target Milestone: ---

Created attachment 17005
  --> https://sourceware.org/bugzilla/attachment.cgi?id=17005&action=edit
Reproduction shell script

(Not really a proper bug report, sorry! Feel free to close immediately if
deemed inappropriate. I'm just looking for confirmation that GNU ld is indeed
correct)

Hi, could really do with an expert opinion here. Downstream at Arch Linux we've
stumbled across an oddity which concerns behaviours of different linkers.
Essentially, ld and gold  appear to do the right thing. Whereas other linkers
(lld, mold and wild) all do the same (possibly wrong?) thing.

The attached 2 files constitute the test case reproducer using a C toolchain
(Note: prepared with LLM assistance). For background, we first noticed the
issue in our rust toolchain (which uses lld).

The core problem is that `ldd -u` complains about "Unused direct dependencies"
which trips up our ELF linter when building some distro packages.

Arch Issue:
https://gitlab.archlinux.org/archlinux/packaging/packages/lld/-/work_items/15

LLVM/lld issue:
https://github.com/llvm/llvm-project/issues/222844

Any thoughts you might have would be very much appreciated. Thanks!

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

Reply via email to