Class ExternalSymbolResolver

java.lang.Object
ghidra.program.util.ExternalSymbolResolver

public class ExternalSymbolResolver extends Object
  • Constructor Details

    • ExternalSymbolResolver

      public ExternalSymbolResolver()
  • Method Details

    • getRequiredLibraryProperty

      public static String getRequiredLibraryProperty(int libraryIndex)
      Gets a program property name to represent the ordered required library of the given index
      Parameters:
      libraryIndex - The index of the required library
      Returns:
      A program property name to represent the ordered required library of the given index
    • fixUnresolvedExternalSymbols

      public static void fixUnresolvedExternalSymbols(List<Loaded<Program>> loadedPrograms, boolean fixAll, MessageLog messageLog, TaskMonitor monitor) throws CancelledException, IOException
      Links unresolved symbols to the first symbol found in the (ordered) linked libraries (saved in the program's properties as "Required Library [").

      The ordering and precedence logic is loader specific though no particular binary formats are parsed or required.

      The program's external libraries need to already be populated with paths to already existing / imported libraries.

      Parameters:
      loadedPrograms - The Loaded Programs to fix. The first entry is the "primary" Loaded Program.
      fixAll - True if all of the Loaded Programs should be fixed; false if just the "primary" Loaded Program should be fixed.
      messageLog - MessageLog to write info message to.
      monitor - TaskMonitor to watch for cancel and update with progress.
      Throws:
      CancelledException - if user cancels
      IOException - if error reading
    • getLibrarySearchList

      public static List<Library> getLibrarySearchList(Program program)