|
|
1.1 root 1: #ident "@(#)sgs-inc:common/patch.h 1.3.1.1"
2:
3: struct plist
4: {
5: long blk_cnt; /* the number of blocks */
6: union pentry
7: {
8: struct
9: {
10: long blk_addr; /* block address */
11: long blk_size; /* size of block */
12: unsigned short blk_scnum; /* section of block */
13: char blk_type; /* type of block */
14: char blk_pad; /* padding */
15: } type01; /* FREE or OLD FCN */
16: struct
17: {
18: long blk_addr; /* block address */
19: long blk_ndx; /* fcn tv index */
20: unsigned short blk_scnum; /* section of block */
21: char blk_type; /* type of block */
22: char blk_size; /* size of block */
23: } type2; /* DECF */
24: } block[1];
25: };
26:
27: #define PLIST struct plist
28: #define PENTRY union pentry
29:
30: #define PLSIZE sizeof(PLIST)
31: #define PESIZE sizeof(PENTRY)
32:
33: /*
34: * There are three types of patch list items:
35: *
36: * type0 : a block of FREE, unallocated patch space. This space
37: * can be used for overwrites
38: * type1 : a block of text space belonging to a function which
39: * has been replaced. The OLD Function can still
40: * be active
41: * type2 : a DECision Function, currently in use
42: */
43:
44: #define FREE_patch 0
45: #define OLDF_patch 1
46: #define DECF_patch 2
47:
48: /*
49: * Specify the number of bytes to leave at the start of any replaced
50: * function, when tv are not being used
51: *
52: * This space holds the explicit branch instruction - a "pseudo tv" -
53: * and must be an integral number of words, to insure proper function
54: * alignment
55: */
56:
57: #define BRANCH 8
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.