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

--- Comment #7 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <h...@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eee822a66066a17529d7af544b1be767517a6c72

commit eee822a66066a17529d7af544b1be767517a6c72
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Fri Jun 13 08:20:49 2025 +0800

    objcopy: Correctly check archive element for LTO IR

    commit 717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d
    Author: H.J. Lu <hjl.to...@gmail.com>
    Date:   Sun May 4 05:12:46 2025 +0800

        strip: Add GCC LTO IR support

    added:

    @@ -3744,6 +3768,12 @@ copy_archive (bfd *ibfd, bfd *obfd, const char
    *output_target,
         goto cleanup_and_exit;
       }

    +#if BFD_SUPPORTS_PLUGINS
    +      /* Copy LTO IR file as unknown object.  */
    +      if (bfd_plugin_target_p (ibfd->xvec))
                                    ^^^^ A typo, should be this_element.
    +  ok_object = false;
    +      else
    +#endif
           if (ok_object)
       {
         ok = copy_object (this_element, output_element, input_arch);

    to check if the archive element is a LTO IR file.  "ibfd" is the archive
    BFD.  "this_element" should be used to check for LTO IR in the archive
    element.  Fix it by replacing "ibfd" with "this_element".

            PR binutils/33078
            * objcopy.c (copy_archive): Correctly check archive element for
            LTO IR.
            * testsuite/binutils-all/objcopy.exp (strip_test_archive): New.
            Run strip_test_archive.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>

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

Reply via email to