Lines Matching defs:offset_tbl

969 sort_offsettbl(int	segcnt, seg_info_t	*offset_tbl)
977 if (offset_tbl[cntx].offset >
978 offset_tbl[cnty].offset) {
979 (void) memcpy(&tmp, &offset_tbl[cnty],
981 (void) memcpy(&offset_tbl[cnty],
982 &offset_tbl[cntx],
985 (void) memcpy(&offset_tbl[cntx], &tmp,
1042 seg_info_t *offset_tbl)
1049 if (!offset_tbl[cnt - 1].fixed) {
1050 if (offset_tbl[cnt].offset
1051 - (offset_tbl[cnt -1 ].offset
1052 + offset_tbl[cnt - 1].length) > 0) {
1054 diff = offset_tbl[cnt].offset -
1055 (offset_tbl[cnt - 1].offset
1056 + offset_tbl[cnt - 1].length);
1057 newoffset = offset_tbl[cnt - 1].offset
1063 offset_tbl[cnt - 1].offset = newoffset;
1065 sort_offsettbl(segcnt, offset_tbl);
1080 seg_info_t *offset_tbl)
1091 offset_tbl[cnt].segnum = cnt;
1092 offset_tbl[cnt].offset = segment->offset;
1093 offset_tbl[cnt].length = segment->length;
1094 offset_tbl[cnt].fixed = segdesc.field.fixed;
1098 offset_tbl[cnt].segnum = -1;
1099 offset_tbl[cnt].offset = sizeof (section_layout_t) + ((cnt + 1)
1102 offset_tbl[cnt].length = 0;
1103 offset_tbl[cnt].fixed = 1;
1106 offset_tbl[cnt+1].segnum = -1;
1107 offset_tbl[cnt+1].offset = secsize;
1108 offset_tbl[cnt+1].length = 0;
1109 offset_tbl[cnt+1].fixed = 1;
1114 hole_discovery(int bytes, int segcnt, int *totsize, seg_info_t *offset_tbl)
1120 if (bytes <= offset_tbl[cnt].offset -
1121 (offset_tbl[cnt - 1].offset +
1122 offset_tbl[cnt - 1].length)) {
1123 return (offset_tbl[cnt].offset - bytes);
1126 *totsize += offset_tbl[cnt].offset -
1127 (offset_tbl[cnt - 1].offset +
1128 offset_tbl[cnt - 1].length);
1140 segment_hdr_present(int segoffset, int size, seg_info_t *offset_tbl)
1142 if ((segoffset + size) <= offset_tbl[0].offset)
1160 seg_info_t *offset_tbl;
1177 offset_tbl = malloc((segcnt + 2) * sizeof (seg_info_t));
1178 if (offset_tbl == NULL) {
1183 ret = build_offset_tbl(seghdr, segcnt, secsize, offset_tbl);
1185 free(offset_tbl);
1190 sort_offsettbl(segcnt, offset_tbl);
1198 offset_tbl);
1202 if (offset_tbl[0].fixed == SEGMENT_FIXED) { /* fixed segment */
1203 free(offset_tbl);
1207 newoffset = hole_discovery(offset_tbl[0].length,
1208 segcnt, &totsize, offset_tbl);
1211 offset_tbl[0].offset = newoffset;
1216 sort_offsettbl(segcnt, offset_tbl);
1219 if (totsize > offset_tbl[0].length) {
1221 contfd, offset_tbl);
1223 free(offset_tbl);
1230 newoffset = hole_discovery(segsize, segcnt, &totsize, offset_tbl);
1235 offset_tbl);
1237 &totsize, offset_tbl);
1240 free(offset_tbl);
1246 free(offset_tbl);
1249 free(offset_tbl);