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

            Bug ID: 33246
           Summary: Possible 2.45 regression related to strip and LTO
           Product: binutils
           Version: 2.46 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: toolybird at tuta dot io
  Target Milestone: ---

Hey, over at Arch Linux (x86_64) we have noticed a possible regression in 2.45
when stripping static archives. For example, our `libelf` pkg increased in size
dramatically. Essentially, it seems the stripping process doesn't work properly
when static archives are stripped thusly:

$ strip -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 "$binary" -o
"$tempfile"

However, this appears to work fine:

$ strip -R .gnu.lto_* -R .gnu.debuglto_* "$binary" -o "$tempfile"

Bisection points to:

717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d is the first bad commit
commit 717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d (HEAD)
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Sun May 4 05:12:46 2025 +0800

    strip: Add GCC LTO IR support

    Add GCC LTO IR support to strip by copying GCC LTO IR input as unknown
    object file.  Don't enable LTO plugin in strip unless all LTO sections
    should be removed, assuming all LTO sections will be removed with
    -R .gnu.lto_.*.  Add linker LTO tests for strip with --strip-unneeded
    and GCC LTO IR inputs.

Apologies if we are doing something wrong in our tooling. Any thoughts? Thanks.

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

Reply via email to