问题
May a symbol in the ELF table use UTF8 characters or is it restricted to ASCII?
Note: It is not a problem that I am trying to solve, it is more something I am wondering.
回答1:
ELF string tables use NUL-terminated strings, so you could possibly store UTF-8 encoded symbol names inside them.
That said, the tools that use such symbols would need to be Unicode-aware to work correctly. For example:
- Whether your programming language tool chain correctly classifies a specified Unicode 'character' as a letter, a numeral or punctuation.
- Whether scripts that are written right-to-left (or top-to-bottom) can be used.
- Whether symbols written in complex scripts (Arabic, Thai, etc) are rendered correctly by your system.
- Whether characters from different scripts can be mixed when creating a symbol.
- Whether sorting works as expected, for those tools that have to produce sorted outputs.
... etc.
来源:https://stackoverflow.com/questions/15295028/can-elf-symbols-be-represented-in-utf8