Hi Everyone,
I am working on the GSOC project "Bypass Assembler when generating LTO
object files." My mentors and I have decided to work on the ELF files
first, so I will add .symtab along with the symbol __gnu_lto_slim to
the ELF file as a first step.
When I was going through the simple-object-elf.c:
simple_object_elf_write_to_file(....) I found out that it writes the
following:
/* Write out a complete ELF file.
Ehdr
initial dummy Shdr
user-created Shdrs
.shstrtab Shdr
user-created section data
.shstrtab data */
and .symtab is missing here. To add the missing symtab I have thought
of these two possible implementations.
1) Add it in simple-object-elf.c (based on -fbypass-asm flag).
2) We can add .symtab section in lto-object.cc along with other LTO sections.
I am a bit skeptical about the second one as .symtab with other lto
sections might be confusing. Any comments regarding which one should I
proceed with will be helpful.
--
Thanks & Regards
Rishi Raj