4

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.

André Puel
  • 8,741
  • 9
  • 52
  • 83

1 Answers1

4

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.

jkoshy
  • 1,793
  • 15
  • 23