som.h
001: #ifndef _LINUX_SOM_H
002: #define _LINUX_SOM_H
003: 
004: 
005: 
006: 
007: #include <linux/time.h>
008: 
009: #define SOM_PAGESIZE 4096
010: 
011: 
012: struct som_hdr {
013:         short           system_id;              
014:         short           a_magic;                
015:         unsigned int    version_id;             
016:         struct timespec file_time;              
017:         unsigned int    entry_space;            
018:         unsigned int    entry_subspace;         
019:         unsigned int    entry_offset;           
020:         unsigned int    aux_header_location;    
021:         unsigned int    aux_header_size;        
022:         unsigned int    som_length;             
023:         unsigned int    presumed_dp;            
024:         unsigned int    space_location;         
025:         unsigned int    space_total;            
026:         unsigned int    subspace_location;      
027:         unsigned int    subspace_total;         
028:         unsigned int    loader_fixup_location;  
029:         unsigned int    loader_fixup_total;     
030:         unsigned int    space_strings_location; 
031:         unsigned int    space_strings_size;     
032:         unsigned int    init_array_location;    
033:         unsigned int    init_array_total;       
034:         unsigned int    compiler_location;      
035:         unsigned int    compiler_total;         
036:         unsigned int    symbol_location;        
037:         unsigned int    symbol_total;           
038:         unsigned int    fixup_request_location; 
039:         unsigned int    fixup_request_total;    
040:         unsigned int    symbol_strings_location;
041:         unsigned int    symbol_strings_size;    
042:         unsigned int    unloadable_sp_location; 
043:         unsigned int    unloadable_sp_size;     
044:         unsigned int    checksum;
045: };
046: 
047: 
048: 
049: #define SOM_SID_PARISC_1_0      0x020b
050: #define SOM_SID_PARISC_1_1      0x0210
051: #define SOM_SID_PARISC_2_0      0x0214
052: 
053: 
054: 
055: #define SOM_LIB_EXEC            0x0104
056: #define SOM_RELOCATABLE         0x0106
057: #define SOM_EXEC_NONSHARE       0x0107
058: #define SOM_EXEC_SHARE          0x0108
059: #define SOM_EXEC_DEMAND         0x010B
060: #define SOM_LIB_DYN             0x010D
061: #define SOM_LIB_SHARE           0x010E
062: #define SOM_LIB_RELOC           0x0619
063: 
064: 
065: 
066: #define SOM_ID_OLD              85082112
067: #define SOM_ID_NEW              87102412
068: 
069: struct aux_id {
070:         unsigned int    mandatory :1;   
071:         unsigned int    copy      :1;   
072:         unsigned int    append    :1;   
073:         unsigned int    ignore    :1;   
074:         unsigned int    reserved  :12;
075:         unsigned int    type      :16;  
076:         unsigned int    length;         
077: };
078: 
079: 
080: struct som_exec_auxhdr {
081:         struct aux_id   som_auxhdr;
082:         int             exec_tsize;     
083:         int             exec_tmem;      
084:         int             exec_tfile;     
085:         int             exec_dsize;     
086:         int             exec_dmem;      
087:         int             exec_dfile;     
088:         int             exec_bsize;     
089:         int             exec_entry;     
090:         int             exec_flags;     
091:         int             exec_bfill;     
092: };
093: 
094: 
095: 
096: 
097: union name_pt {
098:         char *          n_name;
099:         unsigned int    n_strx;
100: };
101: 
102: 
103: struct space_dictionary_record {
104:         union name_pt   name;                   
105:         unsigned int    is_loadable     :1;     
106:         unsigned int    is_defined      :1;     
107:         unsigned int    is_private      :1;     
108:         unsigned int    has_intermediate_code :1; 
109:         unsigned int    is_tspecific    :1;     
110:         unsigned int    reserved        :11;    
111:         unsigned int    sort_key        :8;     
112:         unsigned int    reserved2       :8;     
113: 
114:         int             space_number;           
115:         int             subspace_index;         
116:         unsigned int    subspace_quantity;      
117:         int             loader_fix_index;       
118:         unsigned int    loader_fix_quantity;    
119:         int             init_pointer_index;     
120:         unsigned int    init_pointer_quantity;  
121: };
122: 
123: 
124: struct subspace_dictionary_record {
125:         int             space_index;
126:         unsigned int    access_control_bits :7;
127:         unsigned int    memory_resident :1;
128:         unsigned int    dup_common      :1;
129:         unsigned int    is_common       :1;
130:         unsigned int    quadrant        :2;
131:         unsigned int    initially_frozen :1;
132:         unsigned int    is_first        :1;
133:         unsigned int    code_only       :1;
134:         unsigned int    sort_key        :8;
135:         unsigned int    replicate_init  :1;
136:         unsigned int    continuation    :1;
137:         unsigned int    is_tspecific    :1;
138:         unsigned int    is_comdat       :1;
139:         unsigned int    reserved        :4;
140: 
141:         int             file_loc_init_value;
142:         unsigned int    initialization_length;
143:         unsigned int    subspace_start;
144:         unsigned int    subspace_length;
145: 
146:         unsigned int    reserved2       :5;
147:         unsigned int    alignment       :27;
148: 
149:         union name_pt   name;
150:         int             fixup_request_index;
151:         unsigned int    fixup_request_quantity;
152: };
153: 
154: #endif 
155: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved