Lines Matching refs:mapping
264 void FillInRemovedLengths(Mapping* mapping) { in FillInRemovedLengths() argument
265 assert(mapping != NULL); in FillInRemovedLengths()
285 for (size_t find = 0; find < mapping->size(); ++find) { in FillInRemovedLengths()
289 assert(mapping->at(find - 1).rva_original <= in FillInRemovedLengths()
290 mapping->at(find).rva_original); in FillInRemovedLengths()
294 if (rva_front < mapping->at(find).rva_original) { in FillInRemovedLengths()
297 DWORD removed = mapping->at(find).rva_original - rva_front; in FillInRemovedLengths()
299 if (mapping->at(fill).rva_original + mapping->at(fill).length != in FillInRemovedLengths()
306 mapping->at(fill).removed = removed; in FillInRemovedLengths()
311 rva_front = mapping->at(find).rva_original + mapping->at(find).length; in FillInRemovedLengths()
317 void BuildMapping(const OmapData& omap_data, Mapping* mapping) { in BuildMapping() argument
318 assert(mapping != NULL); in BuildMapping()
320 mapping->clear(); in BuildMapping()
344 mapping->push_back(mr); in BuildMapping()
382 if (!mapping->empty()) { in BuildMapping()
383 MappedRange& prev_mr = mapping->back(); in BuildMapping()
392 mapping->push_back(mr); in BuildMapping()
396 std::sort(mapping->begin(), mapping->end(), MappedRangeOriginalLess); in BuildMapping()
400 FillInRemovedLengths(mapping); in BuildMapping()
408 if (image_map->mapping.size() == 0) in BuildEndpointIndexMap()
411 const Mapping& mapping = image_map->mapping; in BuildEndpointIndexMap() local
416 for (size_t i = 0; i < mapping.size(); ++i) { in BuildEndpointIndexMap()
417 endpoints.insert(mapping[i].rva_original); in BuildEndpointIndexMap()
418 endpoints.insert(mapping[i].rva_original + in BuildEndpointIndexMap()
419 mapping[i].length + in BuildEndpointIndexMap()
420 mapping[i].removed); in BuildEndpointIndexMap()
429 eim[i].index = mapping.size(); in BuildEndpointIndexMap()
437 for (size_t i = 0; i < mapping.size(); ++i) { in BuildEndpointIndexMap()
438 EndpointIndex ei1 = { mapping[i].rva_original, 0 }; in BuildEndpointIndexMap()
442 EndpointIndex ei2 = { mapping[i].rva_original + mapping[i].length + in BuildEndpointIndexMap()
443 mapping[i].removed, 0 }; in BuildEndpointIndexMap()
577 BuildMapping(omap_data, &image_map->mapping); in BuildImageMap()
586 const Mapping& map = image_map.mapping; in MapAddressRange()