hotspot/src/share/vm/utilities/elfFile.hpp
changeset 15926 8e87d545195f
parent 13963 e5b53c306fb5
child 22857 2167396cfc83
child 22234 da823d78ad65
equal deleted inserted replaced
15925:6a17dd9e92ac 15926:8e87d545195f
    41 typedef Elf64_Off       Elf_Off;
    41 typedef Elf64_Off       Elf_Off;
    42 typedef Elf64_Addr      Elf_Addr;
    42 typedef Elf64_Addr      Elf_Addr;
    43 
    43 
    44 typedef Elf64_Ehdr      Elf_Ehdr;
    44 typedef Elf64_Ehdr      Elf_Ehdr;
    45 typedef Elf64_Shdr      Elf_Shdr;
    45 typedef Elf64_Shdr      Elf_Shdr;
       
    46 typedef Elf64_Phdr      Elf_Phdr;
    46 typedef Elf64_Sym       Elf_Sym;
    47 typedef Elf64_Sym       Elf_Sym;
    47 
    48 
    48 #if !defined(_ALLBSD_SOURCE) || defined(__APPLE__)
    49 #if !defined(_ALLBSD_SOURCE) || defined(__APPLE__)
    49 #define ELF_ST_TYPE ELF64_ST_TYPE
    50 #define ELF_ST_TYPE ELF64_ST_TYPE
    50 #endif
    51 #endif
    57 typedef Elf32_Addr      Elf_Addr;
    58 typedef Elf32_Addr      Elf_Addr;
    58 
    59 
    59 
    60 
    60 typedef Elf32_Ehdr      Elf_Ehdr;
    61 typedef Elf32_Ehdr      Elf_Ehdr;
    61 typedef Elf32_Shdr      Elf_Shdr;
    62 typedef Elf32_Shdr      Elf_Shdr;
       
    63 typedef Elf32_Phdr      Elf_Phdr;
    62 typedef Elf32_Sym       Elf_Sym;
    64 typedef Elf32_Sym       Elf_Sym;
    63 
    65 
    64 #if !defined(_ALLBSD_SOURCE) || defined(__APPLE__)
    66 #if !defined(_ALLBSD_SOURCE) || defined(__APPLE__)
    65 #define ELF_ST_TYPE ELF32_ST_TYPE
    67 #define ELF_ST_TYPE ELF32_ST_TYPE
    66 #endif
    68 #endif
   121 
   123 
   122 protected:
   124 protected:
   123    ElfFile*  next() const { return m_next; }
   125    ElfFile*  next() const { return m_next; }
   124    void set_next(ElfFile* file) { m_next = file; }
   126    void set_next(ElfFile* file) { m_next = file; }
   125 
   127 
       
   128  public:
       
   129   // Returns true if the elf file is marked NOT to require an executable stack,
       
   130   // or if the file could not be opened.
       
   131   // Returns false if the elf file requires an executable stack, the stack flag
       
   132   // is not set at all, or if the file can not be read.
       
   133   // On systems other than linux it always returns false.
       
   134   bool specifies_noexecstack() NOT_LINUX({ return false; });
       
   135 
   126  protected:
   136  protected:
   127     ElfFile*         m_next;
   137     ElfFile*         m_next;
   128 
   138 
   129  private:
   139  private:
   130   // file
   140   // file