2#ifndef ROSE_SgAsmElfSectionTableEntry_H 
    3#define ROSE_SgAsmElfSectionTableEntry_H 
    5#include <Cxx_GrammarDeclarations.h> 
    6#include <SgAsmExecutableFileFormat.h> 
   27#include <Rose/BinaryAnalysis/Address.h> 
   28#include <Rose/BinaryAnalysis/ByteOrder.h> 
   29#include <sageContainer.h> 
   36#if !defined(DOCUMENTATION) 
   51#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   53    friend class boost::serialization::access;
 
   59        s & BOOST_SERIALIZATION_NVP(p_sh_name);
 
   60        s & BOOST_SERIALIZATION_NVP(p_sh_type);
 
   61        s & BOOST_SERIALIZATION_NVP(p_sh_link);
 
   62        s & BOOST_SERIALIZATION_NVP(p_sh_info);
 
   63        s & BOOST_SERIALIZATION_NVP(p_sh_flags);
 
   64        s & BOOST_SERIALIZATION_NVP(p_sh_addr);
 
   65        s & BOOST_SERIALIZATION_NVP(p_sh_offset);
 
   66        s & BOOST_SERIALIZATION_NVP(p_sh_size);
 
   67        s & BOOST_SERIALIZATION_NVP(p_sh_addralign);
 
   68        s & BOOST_SERIALIZATION_NVP(p_sh_entsize);
 
   69        s & BOOST_SERIALIZATION_NVP(p_extra);
 
   92        SHT_LOOS        = 0x60000000,         
 
   93        SHT_GNU_verdef  = 0x6ffffffd,         
 
   94        SHT_GNU_verneed = 0x6ffffffe,         
 
   95        SHT_GNU_versym  = 0x6fffffff,         
 
   96        SHT_HIOS        = 0x6fffffff,                
 
   98        SHT_LOPROC      = 0x70000000,         
 
   99        SHT_HIPROC      = 0x7fffffff,
 
  100        SHT_LOUSER      = 0x80000000,         
 
  101        SHT_HIUSER      = 0xffffffff
 
  109        SHF_EXECINSTR=       (1 << 2),       
 
  111        SHF_STRINGS=         (1 << 5),       
 
  112        SHF_INFO_LINK=       (1 << 6),       
 
  113        SHF_LINK_ORDER=      (1 << 7),       
 
  114        SHF_OS_NONCONFORMING=(1 << 8),       
 
  117        SHF_MASKOS=          0x0ff00000,     
 
  118        SHF_MASKPROC=        0xf0000000      
 
  130    struct Elf32SectionTableEntry_disk {
 
  139        uint32_t        sh_addralign;        
 
  142#if !defined(SWIG) && !defined(_MSC_VER) 
  143    __attribute__((packed))
 
  147    struct Elf64SectionTableEntry_disk {
 
  156        uint64_t        sh_addralign;        
 
  159#if !defined(SWIG) && !defined(_MSC_VER) 
  160    __attribute__((packed))
 
  177    unsigned const& get_sh_name() 
const;
 
  178    void set_sh_name(
unsigned const&);
 
  197    unsigned long const& get_sh_link() 
const;
 
  198    void set_sh_link(
unsigned long const&);
 
  207    unsigned long const& get_sh_info() 
const;
 
  208    void set_sh_info(
unsigned long const&);
 
  217    uint64_t 
const& get_sh_flags() 
const;
 
  218    void set_sh_flags(uint64_t 
const&);
 
  277    SgUnsignedCharList 
const& get_extra() 
const;
 
  278    SgUnsignedCharList& get_extra();
 
  279    void set_extra(SgUnsignedCharList 
const&);
 
  306    virtual void dump(FILE*, 
const char *prefix, ssize_t idx) 
const;
 
  316    void update_from_section(
SgAsmElfSection*) ROSE_DEPRECATED(
"use updateFromSection");
 
  353          virtual std::string 
class_name() 
const override;
 
  356          virtual VariantT 
variantT() 
const override; 
 
  361          enum { static_variant = V_SgAsmElfSectionTableEntry };
 
  376          static const unsigned pool_size; 
 
  378          static std::vector<unsigned char *> pools; 
 
  383          static unsigned long initializeStorageClassArray(SgAsmElfSectionTableEntryStorageClass *); 
 
  386          static void clearMemoryPool(); 
 
  387          static void deleteMemoryPool(); 
 
  390          static void extendMemoryPoolForFileIO(); 
 
  398          static unsigned long getNumberOfValidNodesAndSetGlobalIndexInFreepointer(
unsigned long); 
 
  400          static void resetValidFreepointers(); 
 
  402          static unsigned long getNumberOfLastValidPointer(); 
 
  405#if defined(INLINE_FUNCTIONS) 
  407          inline void *
operator new (
size_t size);
 
  410          void *
operator new (
size_t size);
 
  413          void operator delete (
void* pointer, 
size_t size);
 
  416          void operator delete (
void* pointer)
 
  462#ifndef ROSE_USE_INTERNAL_FRONTEND_DEVELOPMENT 
  465          virtual RTIReturnType 
roseRTI() 
override;
 
  479          virtual const char* 
sage_class_name() const  override ROSE_DEPRECATED_FUNCTION;
 
  485          virtual int variant() const ROSE_DEPRECATED_FUNCTION;
 
  667          friend class SgAsmElfSectionTableEntryStorageClass;
 
  670          friend class AstSpecificDataManagingClass;
 
  673          friend class AstSpecificDataManagingClassStorageClass;
 
  705#define BUILD_ATERM_SUPPORT 0 
  706   #if BUILD_ATERM_SUPPORT 
  707   #ifdef ROSE_USE_ROSE_ATERM_SUPPORT 
  719          virtual ATerm generate_ATerm() 
override;
 
  722          virtual void generate_ATerm_Annotation(ATerm & term) 
override;
 
  766unsigned long p_sh_link;
 
  770unsigned long p_sh_info;
 
  798SgUnsignedCharList p_extra;
 
Class holding static data and functions supporting File I/O.
 
Attribute containing a regex expression as a string.
 
Represents one entry in an ELF section table.
 
SectionType
Section types (host order).
 
SectionFlags
Section Flags (host order).
 
Base class for ELF file sections.
 
Supporting class from copy mechanism within ROSE.
 
This class represents the base class for all IR nodes within Sage III.
 
virtual RTIReturnType roseRTI()
return C++ Runtime-Time-Information
 
virtual size_t get_numberOfTraversalSuccessors() const
return number of children in the traversal successor list
 
virtual std::vector< std::string > get_traversalSuccessorNamesContainer() const
container of names of variables or container indices used used in the traversal to access AST success...
 
virtual void debugSerializationEnd(const char *className)
Called by generated serializers.
 
static std::string getNodeIdString(SgNode *sgnode)
compute the NodeId for a particular SgNode*.
 
virtual bool isInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
 
int variant() const
Older version function returns enum value "NODE".
 
virtual void processDataMemberReferenceToPointers(ReferenceToPointerHandler *)
FOR INTERNAL USE Processes pairs of references to SgNode* and strings for use in AST tools
 
virtual size_t get_childIndex(SgNode *child) const
index-based access to traversal successors by child node
 
virtual std::vector< SgNode * > get_traversalSuccessorContainer() const
container of pointers to AST successor nodes used in the traversal overridden in every class by gener...
 
virtual VariantT variantT() const
returns new style SageIII enum values
 
virtual long getChildIndex(SgNode *childNode) const
FOR INTERNAL USE Returns a unique index value for the childNode in the list of children at this IR no...
 
virtual void debugSerializationBegin(const char *className)
Called by generated serializers.
 
virtual SgNode * get_traversalSuccessorByIndex(size_t idx) const
index-based access to traversal successors by index number
 
virtual std::string class_name() const
returns a string representing the class name
 
static void visitRepresentativeNode(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for type-based traversal.
 
virtual void checkDataMemberPointersIfInMemoryPool()
FOR INTERNAL USE This is used in internal tests to verify that all IR nodes are allocated from the he...
 
static size_t numberOfNodes()
Returns the total number of IR nodes of this type.
 
virtual void accept(ROSE_VisitorPattern &visitor)
support for the classic visitor pattern done in GoF
 
static void traverseMemoryPoolVisitorPattern(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
 
void executeVisitorMemberFunction(ROSE_VisitorPattern &visitor)
FOR INTERNAL USE Support for visitor pattern.
 
static SgNode * getNodeByNodeId(VariantT variantT, size_t poolIdx, size_t itemIdx)
Find a node by its variant type, pool index, and item index.
 
static size_t memoryUsage()
Returns the size in bytes of the total memory allocated for all IR nodes of this type.
 
static void traverseMemoryPoolNodes(ROSE_VisitTraversal &visit)
FOR INTERNAL USE Support for visitor pattern over all IR nodes by type of IR node.
 
virtual const char * sage_class_name() const
generates string representing the class name: (e.g. for SgNode returns "SgNode").
 
virtual std::vector< std::pair< SgNode *, std::string > > returnDataMemberPointers() const
FOR INTERNAL USE Returns STL vector of pairs of SgNode* and strings for use in AST tools
 
static SgNode * getNodeByNodeIdInternal(size_t poolIdx, size_t itemIdx)
FOR INTERNAL USE Find an SgNode from its memory pool and location therin.
 
SgNode * addRegExpAttribute(std::string s, AstRegExAttribute *a)
Support for AST matching using regular expression.
 
std::uint64_t Address
Address.
 
ROSE_UTIL_API std::string toString(const Path &)
Convert a path to a string.
 
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.
 
void copy(const Word *src, const BitRange &srcRange, Word *dst, const BitRange &dstRange)
Copy some bits.
 
const char * SectionType(int64_t)
Convert SgAsmElfSectionTableEntry::SectionType enum constant to a string.
 
const char * SectionFlags(int64_t)
Convert SgAsmElfSectionTableEntry::SectionFlags enum constant to a string.
 
File format of an ELF Section header.