简体   繁体   中英

where in ELF file i can see the mangled names in c++

I have read about name mangling and ELF file formats of object file. I would like to know which section/segment of ELF exactly, the mangled names are stored? .text or symbol table?

Take a look here http://www.skyfree.org/linux/references/ELF_Format.pdf at page 1-8. The symbol table ( .symtab section) will contain all the symbols which is basically an address and a name which is an offset into the .strtab section. You can find the exact structures in that ELF_Format.pdf. Also take a look at this question for some of the differences between the sections: String table in ELF

A nice tool to play around with the elf format is readelf : http://linux.die.net/man/1/readelf . I know that an executable of it is distributed with MinGW

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM