Class MapLoader

  • All Implemented Interfaces:
    Loader, ExtensionPoint, java.lang.Comparable<Loader>

    public class MapLoader
    extends AbstractLibrarySupportLoader
    A Loader for processing Microsoft MAP files.

    Sample .map file section we parse to extract symbol information:

       ...
       ...
       ...
    
       Address         Publics by Value              Rva+Base               Lib:Object
       
      0000:00000000       ___safe_se_handler_table   0000000000000000     <absolute>
      0000:00000000       ___safe_se_handler_count   0000000000000000     <absolute>
      0000:00000000       __ImageBase                0000000140000000     <linker-defined>
      0001:00000040       foo                        0000000140001040 f   foo.obj
      0001:000000c0       bar                        00000001400010c0 f   foo.obj
      
      ...
      ...
      ...
      
    • Constructor Detail

      • MapLoader

        public MapLoader()
    • Method Detail

      • findSupportedLoadSpecs

        public java.util.Collection<LoadSpec> findSupportedLoadSpecs​(ByteProvider provider)
                                                              throws java.io.IOException
        Description copied from interface: Loader
        If this Loader supports loading the given ByteProvider, this methods returns a Collection of all supported LoadSpecs that contain discovered load specification information that this Loader will need to load. If this Loader cannot support loading the given ByteProvider, an empty Collection is returned.
        Parameters:
        provider - The bytes being loaded.
        Returns:
        A Collection of LoadSpecs that this Loader supports loading, or an empty Collection if this Loader doesn't support loading the given ByteProvider.
        Throws:
        java.io.IOException - if there was an IO-related issue finding the LoadSpecs.
      • getName

        public java.lang.String getName()
        Description copied from interface: Loader
        Gets the Loader's name, which is used both for display purposes, and to identify the Loader in the opinion files.
        Returns:
        The Loader's name.
      • supportsLoadIntoProgram

        public boolean supportsLoadIntoProgram()
        Description copied from interface: Loader
        Checks to see if this Loader supports loading into an existing Program.

        The default behavior of this method is to return false.

        Returns:
        True if this Loader supports loading into an existing Program; otherwise, false.