Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

/users/u3/mtikir/PMaCInstrumentor_v1601/include/defines/SectHeader.d

Go to the documentation of this file.
00001 /*
00002 ##################################################################
00003 XCOFF32     XCOFF64     Name     Description
00004 Offset     Length     Offset     Length
00005 0     8     0     8     s_name     Section name
00006 8     4     8     8     s_paddr+     Physical address
00007 12     4     16     8     s_vaddr+     Virtual address (same as physical address)
00008 16     4     24     8     s_size+     Section size
00009 20     4     32     8     s_scnptr+     Offset in file to raw data for section
00010 24     4     40     8     s_relptr+     Offset in file to relocation entries for section
00011 28     4     48     8     s_lnnoptr+     Offset in file to line number entries for section
00012 32     2     56     4     s_nreloc+     Number of relocation entries
00013 34     2     60     4     s_nlnno+     Number of line number entries
00014 36     2     64     4     s_flags+     Flags to define the section type
00015 +Use "32" or "64" suffix when __XCOFF_HYBRID__ is defined.
00016 ##################################################################
00017 */
00018 
00019 #define SECTION_IS_OF_TYPE_DECL(__str) inline bool is ## __str() { return (GET(s_flags) == STYP_## __str); }
00020 #define IS_SECT_TYPE(__str) is ## __str()
00021 
00022 #define SECTHEADER_MACROS_BASIS(__str)  \
00023     GET_FIELD_BASIS(char*,s_name); \
00024     GET_FIELD_BASIS(uint64_t,s_paddr); \
00025     GET_FIELD_BASIS(uint64_t,s_vaddr); \
00026     GET_FIELD_BASIS(uint64_t,s_size); \
00027     GET_FIELD_BASIS(uint64_t,s_scnptr); \
00028     GET_FIELD_BASIS(uint64_t,s_relptr); \
00029     GET_FIELD_BASIS(uint64_t,s_lnnoptr); \
00030     GET_FIELD_BASIS(uint32_t,s_nreloc); \
00031     GET_FIELD_BASIS(uint32_t,s_nlnno); \
00032     GET_FIELD_BASIS(uint32_t,s_flags); \
00033     \
00034     SECTION_IS_OF_TYPE_DECL(TEXT); \
00035     SECTION_IS_OF_TYPE_DECL(DATA); \
00036     SECTION_IS_OF_TYPE_DECL(BSS); \
00037     SECTION_IS_OF_TYPE_DECL(PAD); \
00038     SECTION_IS_OF_TYPE_DECL(LOADER); \
00039     SECTION_IS_OF_TYPE_DECL(DEBUG); \
00040     SECTION_IS_OF_TYPE_DECL(TYPCHK); \
00041     SECTION_IS_OF_TYPE_DECL(EXCEPT); \
00042     SECTION_IS_OF_TYPE_DECL(OVRFLO); \
00043     SECTION_IS_OF_TYPE_DECL(INFO); \
00044 
00046 #define SECTHEADER_MACROS_CLASS(__str)  \
00047     GET_FIELD_CLASS(char*,s_name); \
00048     GET_FIELD_CLASS(uint64_t,s_paddr); \
00049     GET_FIELD_CLASS(uint64_t,s_vaddr); \
00050     GET_FIELD_CLASS(uint64_t,s_size); \
00051     GET_FIELD_CLASS(uint64_t,s_scnptr); \
00052     GET_FIELD_CLASS(uint64_t,s_relptr); \
00053     GET_FIELD_CLASS(uint64_t,s_lnnoptr); \
00054     GET_FIELD_CLASS(uint32_t,s_nreloc); \
00055     GET_FIELD_CLASS(uint32_t,s_nlnno); \
00056     GET_FIELD_CLASS(uint32_t,s_flags); \
00057 

Generated on Mon Jan 28 11:08:31 2008 for PMaCInstrumentor by doxygen 1.3.5