Class ElfSymbolNameUtils

java.lang.Object
ghidra.app.util.bin.format.elf.ElfSymbolNameUtils

public class ElfSymbolNameUtils NEW extends Object
  • Constructor Details

    • ElfSymbolNameUtils

      public ElfSymbolNameUtils()
  • Method Details

    • replaceInvalidChars

      public static String replaceInvalidChars(String str)
      Converts a string with possible invalid characters into a valid symbol string.

      See getBadElfSymbolStringCodePointReplacement(int, int)

      Parameters:
      str - symbol string to fix, null ok
      Returns:
      original str instance if already valid, otherwise fixed value
    • getBadElfSymbolStringCodePointReplacement

      public static String getBadElfSymbolStringCodePointReplacement(int index, int cp)
      Returns a replacement value for any bad code points found in an Elf symbol string.
      Parameters:
      index - index of the bad code point in the original string
      cp - the bad code point
      Returns:
      replacement value to use instead of the bad code point