From 48ef456a8ec8b6df2f6e097a55872921b9f9b08c Mon Sep 17 00:00:00 2001 From: Rishi Raj Date: Thu, 6 Jul 2023 18:44:40 +0530 Subject: libiberty: lto: Addition of .symtab in elf file. This patch is continutaion of previous patch (bypass-asm: Bypass assembler when generating LTO object files.). Now the emitted object file contains .symtab along with __gnu_lto_slim symbol. gcc/ChangeLog: * lto-object.cc (lto_obj_file_close): include/ChangeLog: * simple-object.h (simple_object_write_add_symbol): libiberty/ChangeLog: * simple-object-common.h (struct simple_object_symbol_struct): * simple-object-elf.c (simple_object_elf_write_ehdr): (simple_object_elf_write_symbol): (simple_object_elf_write_to_file): * simple-object.c (simple_object_start_write): (simple_object_write_add_symbol): (simple_object_release_write): Signed-off-by: Rishi Raj --- gcc/lto-object.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/lto-object.cc b/gcc/lto-object.cc index cb1c3a6..33eca5a 100644 --- a/gcc/lto-object.cc +++ b/gcc/lto-object.cc @@ -187,7 +187,8 @@ lto_obj_file_close (lto_file *file) int err; gcc_assert (lo->base.offset == 0); - + /*Add __gnu_lto_slim symbol*/ + simple_object_write_add_symbol (lo->sobj_w, "__gnu_lto_slim",1,1); errmsg = simple_object_write_to_file (lo->sobj_w, lo->fd, &err); if (errmsg != NULL) { -- cgit v1.1