Skipping names of temporary symbols increased size of ARM binaries.

CC llvm-dev

main.cpp (198 Bytes)

+rafael and pete, who worked on this with me, and a couple of debug info folks.

Honestly this looks like a bug in the linker.

Do they still show up with --discard-locals and/or --discard-all?

What's the linker really doing here? Is this some form of GC, or is it trying to strip out debug info, or...?

ELF files can have two symbol tables. The dynamic symbol table is the
only one that is required for execution. There can also be a regular
symbol table that includes more symbols as a convenience for users.

There are various options controlling which symbols are kept in the
regular symbol table. I think the default is to keep all but .L
symbols in SHF_MERGE sections.


Thank you for looking into this.

–discard-locals produces the same set of symbols.

–discard-all removes the unnamed .L symbols as well as other local symbols.

Hi Rafael,

Could you advise what might be done next about this, please?
Would it be reasonable to discuss the issue in the binutils mailing list?

Thank you.