Can ELF symbols be represented in UTF8?

两盒软妹~` 提交于 2019-12-07 10:31:28

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!