H.J. Lu
9b383903e7
strip: Treat slim GCC/LLVM IR objects the same
...
Slim LLVM IR object is a standalone file whose first 4 bytes are 'B',
'C', 0xc0, 0xde. GCC IR object is regular ELF object with sections
whose names start with .gnu.lto_.* or .gnu.debuglto_.*. GCC IR object
uses a .gnu.lto_.lto.<some_hash> section to encode the LTO bytecode
information:
struct lto_section
{
int16_t major_version;
int16_t minor_version;
unsigned char slim_object;
/* Flags is a private field that is not defined publicly. */
uint16_t flags;
};
In slim GCC IR object, the slim_object field is non-zero. Strip should
treat slim GCC/LLVM IR objects the same. Since strip won't change slim
LLVM IR objects, it should leave slim GCC IR object unchanged even when
asked to remove all IR objects:
1. Set the lto_type field to lto_slim_ir_object for slim LLVM IR object.
2. Always copy slim IR object as unknown object.
bfd/
PR binutils/33271
* format.c (bfd_set_lto_type): Set the lto_type field to
lto_slim_ir_object for slim LLVM IR object.
binutils/
PR binutils/33271
* objcopy.c (lto_sections_removed): Removed.
(copy_archive): Always copy slim IR object as unknown object.
(copy_file): Likewise.
(strip_main): Updated.
ld/
PR binutils/33271
* testsuite/ld-plugin/lto-binutils.exp: Don't check if fat IR is
available when running slim IR tests.
* testsuite/ld-plugin/strip-1a-s-all.nd: Expect full symbol list.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com >
2025-08-14 18:12:36 -07:00
..
2024-08-14 08:40:18 -07:00
2024-08-22 06:34:53 -07:00
2024-08-22 06:34:53 -07:00
2024-08-14 08:40:18 -07:00
2022-12-03 10:43:29 -08:00
2023-11-10 11:37:27 +00:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2023-11-10 11:37:27 +00:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2025-01-14 05:22:04 +08:00
2020-09-09 12:36:59 +09:30
2020-09-09 12:36:59 +09:30
2020-09-10 18:58:51 +09:30
2020-09-10 18:58:51 +09:30
2020-09-09 12:36:59 +09:30
2020-11-02 09:39:53 +10:30
2020-11-02 09:39:53 +10:30
2020-11-02 09:39:53 +10:30
2020-11-02 09:39:53 +10:30
2025-04-07 16:37:07 +02:00
2025-04-07 16:37:07 +02:00
2025-04-07 16:37:07 +02:00
2025-08-14 18:12:36 -07:00
2025-07-28 23:00:26 +02:00
2024-04-05 05:02:38 -07:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-07-06 09:53:18 +08:00
2023-05-11 14:31:09 +00:00
2023-05-11 14:31:09 +00:00
2025-01-01 18:29:57 +10:30
2021-02-04 05:11:49 -08:00
2021-02-04 05:11:49 -08:00
2021-02-04 05:11:49 -08:00
2021-02-04 05:11:49 -08:00
2021-02-04 05:11:49 -08:00
2021-01-04 18:58:15 +10:30
2020-06-19 12:59:30 +09:30
2020-06-19 12:59:30 +09:30
2020-06-19 10:01:09 +09:30
2020-06-19 12:59:30 +09:30
2024-03-26 07:17:17 -07:00
2024-03-26 07:17:17 -07:00
2020-06-16 22:13:20 +09:30
2019-09-23 08:51:36 -07:00
2020-02-10 19:01:53 -08:00
2020-02-19 13:10:47 +10:30
2020-02-26 03:58:47 -08:00
2020-02-26 03:58:47 -08:00
2020-02-26 03:58:47 -08:00
2020-02-26 03:58:47 -08:00
2020-02-26 03:58:47 -08:00
2020-02-26 03:58:47 -08:00
2020-02-26 03:58:47 -08:00
2020-03-01 17:10:49 -08:00
2020-03-01 17:10:49 -08:00
2025-05-08 09:26:56 +09:30
2020-03-01 17:10:49 -08:00
2025-05-08 09:26:56 +09:30
2020-06-24 03:56:16 -07:00
2020-06-24 03:56:16 -07:00
2020-07-22 03:49:17 -07:00
2020-07-22 03:49:17 -07:00
2020-07-22 03:49:17 -07:00
2020-07-22 03:49:17 -07:00
2020-07-22 03:49:17 -07:00
2020-07-22 03:49:17 -07:00
2020-07-22 03:49:17 -07:00
2020-08-16 05:45:02 -07:00
2020-08-16 05:45:02 -07:00
2020-11-02 09:39:53 +10:30
2020-11-02 09:39:53 +10:30
2021-02-02 20:09:42 +10:30
2021-02-02 20:09:42 +10:30
2021-02-02 20:09:42 +10:30
2021-02-02 20:09:42 +10:30
2021-02-02 20:09:42 +10:30
2021-02-04 14:09:51 +10:30
2021-02-26 17:49:04 +10:30
2021-02-26 17:49:04 +10:30
2021-02-26 17:49:04 +10:30
2021-02-26 17:49:04 +10:30
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-07-28 06:01:32 -07:00
2021-08-27 19:44:57 -07:00
2021-08-27 19:44:57 -07:00
2021-08-27 19:44:57 -07:00
2021-08-27 19:44:57 -07:00
2021-08-27 19:44:57 -07:00
2021-08-27 19:44:57 -07:00
2022-03-10 16:06:12 +10:30
2022-03-09 18:23:43 -08:00
2022-03-09 18:23:43 -08:00
2022-02-13 20:31:44 -08:00
2022-02-13 20:31:44 -08:00
2022-05-04 16:26:51 -07:00
2023-03-31 08:34:48 -07:00
2023-03-31 08:34:48 -07:00
2024-04-05 05:02:38 -07:00
2024-04-05 05:02:38 -07:00
2024-04-05 05:02:38 -07:00
2024-04-08 05:18:24 -07:00
2024-04-08 05:18:24 -07:00
2024-04-08 05:18:24 -07:00
2024-04-08 05:18:24 -07:00
2024-04-08 05:18:24 -07:00
2024-04-16 17:45:23 -07:00
2024-04-16 17:45:23 -07:00
2024-04-16 17:45:23 -07:00
2024-07-09 01:37:35 -07:00
2024-07-09 01:37:35 -07:00
2024-08-03 13:52:38 +09:30
2024-08-03 13:52:38 +09:30
2024-08-03 13:52:38 +09:30
2025-04-10 10:29:28 -07:00
2025-04-10 10:29:28 -07:00
2025-04-10 10:29:28 -07:00
2025-04-10 10:29:28 -07:00
2025-04-10 10:29:28 -07:00
2025-08-06 04:51:20 -07:00
2025-05-14 15:09:40 +08:00
2025-05-14 15:09:40 +08:00
2025-08-14 18:12:36 -07:00
2025-05-14 15:09:40 +08:00
2025-05-14 15:09:40 +08:00
2025-05-14 15:09:40 +08:00
2025-05-14 15:09:40 +08:00