Class ElfHelper

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class ElfHelper
    extends java.lang.Object
    implements java.lang.AutoCloseable
    ElfHelper is a wrapper class for the Elf class to provide higher level API for sorting/searching the ELF data.
    See Also:
    Elf
    • Constructor Detail

      • ElfHelper

        public ElfHelper​(Elf elf)
                  throws java.io.IOException
        Create a new ElfHelper using an existing Elf object.
        Parameters:
        elf - An existing Elf object to wrap.
        Throws:
        java.io.IOException - Error processing the Elf file.
      • ElfHelper

        public ElfHelper​(java.lang.String filename)
                  throws java.io.IOException
        Create a new ElfHelper based on the given filename.
        Parameters:
        filename - The file to use for creating a new Elf object.
        Throws:
        java.io.IOException - Error processing the Elf file.
        See Also:
        Elf( String )
      • ElfHelper

        public ElfHelper​(java.lang.String filename,
                         long fileoffset)
                  throws java.io.IOException
        Create a new ElfHelper based on the given filename.
        Parameters:
        filename - The file to use for creating a new Elf object.
        Throws:
        java.io.IOException - Error processing the Elf file.
        See Also:
        Elf( String )
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • dispose

        public void dispose()
      • getElf

        public Elf getElf()
        Give back the Elf object that this helper is wrapping
      • getExternalFunctions

        public Elf.Symbol[] getExternalFunctions()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getExternalObjects

        public Elf.Symbol[] getExternalObjects()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getUndefined

        public Elf.Symbol[] getUndefined()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getLocalFunctions

        public Elf.Symbol[] getLocalFunctions()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getLocalObjects

        public Elf.Symbol[] getLocalObjects()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getCommonObjects

        public Elf.Symbol[] getCommonObjects()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getNeeded

        public Elf.Dynamic[] getNeeded()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getSoname

        public java.lang.String getSoname()
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getQnxUsage

        public java.lang.String getQnxUsage()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getSizes

        public ElfHelper.Sizes getSizes()
                                 throws java.io.IOException
        Throws:
        java.io.IOException