PING [PATCH] strip: Add GCC LTO IR support
H.J. Lu
hjl.tools@gmail.com
Tue May 13 01:24:51 GMT 2025
More information about the Binutils mailing list
Tue May 13 01:24:51 GMT 2025
- Previous message (by thread): [PATCH] strip: Add GCC LTO IR support
- Next message (by thread): PING [PATCH] strip: Add GCC LTO IR support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, May 5, 2025 at 2:20 PM H.J. Lu <hjl.tools@gmail.com> wrote: > > 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. > > binutils/ > > PR binutils/21479 > * objcopy.c: Include "plugin-api.h" and "plugin.h". > (lto_sections_removed): New. > (command_line_switch): Add OPTION_PLUGIN. > (strip_options): Likewise. > (strip_usage): Display "--plugin NAME". > (copy_unknown_file): New function. > (copy_unknown_object): Call copy_unknown_file. > (copy_archive): Copy input LTO IR member as unknown object. > (copy_file): Set input target to "plugin" for strip if it is > unset unless all LTO sections should be removed. Copy input > LTO IR file as unknown file. > (strip_main): Call bfd_plugin_set_program_name. Handle > OPTION_PLUGIN. Set lto_sections_removed to true if all GCC > LTO sections should be removed. > * doc/binutils.texi: Document --plugin for strip. > > ld/ > > PR binutils/21479 > * testsuite/ld-plugin/lto-binutils.exp: New file. > * testsuite/ld-plugin/strip-1a-fat.c: Likewise. > * testsuite/ld-plugin/strip-1a-fat.rd: Likewise. > * testsuite/ld-plugin/strip-1b-fat.c: Likewise. > * testsuite/ld-plugin/strip-1b-fat.rd: Likewise. > * testsuite/ld-plugin/strip-1a.c: Likewise. > * testsuite/ld-plugin/strip-1b.c: Likewise. > * testsuite/lib/ld-lib.exp (run_cc_link_tests): Add optional > trailing ld options. > > OK for master? > > Thanks. > Hi Nick, Alan, Jan, Do you have any comments on this patch? https://sourceware.org/pipermail/binutils/2025-May/140875.html Thanks. -- H.J.
- Previous message (by thread): [PATCH] strip: Add GCC LTO IR support
- Next message (by thread): PING [PATCH] strip: Add GCC LTO IR support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list