private void buildNameHash() {
		nameHash.clear();

		int pos = (descriptors.length + 1) * BoundImportDescriptor.IMAGE_SIZEOF_BOUND_IMPORT_DESCRIPTOR;
		for (BoundImportDescriptor descriptor : descriptors) {
			pos += (descriptor.getNumberOfModuleForwarderRefs() * BoundImportForwarderRef.IMAGE_SIZEOF_BOUND_IMPORT_FORWARDER_REF);
		}

		for (BoundImportDescriptor descriptor : descriptors) {
			Short offset = nameHash.get(descriptor.getModuleName());
			if (offset != null) {
				descriptor.setOffsetModuleName(offset.shortValue());
			}
			else {
				String moduleName = descriptor.getModuleName();
				if (moduleName != null && moduleName.length() > 0) {
					nameHash.put(moduleName, Short.valueOf((short)pos));
					descriptor.setOffsetModuleName((short)pos);
					pos += (descriptor.getModuleName().length() + 1);
				}
			}
			
			for (int j = 0 ; j < descriptor.getNumberOfModuleForwarderRefs() ; ++j) {
				BoundImportForwarderRef forwarder = descriptor.getBoundImportForwarderRef(j);
				if (forwarder == null) {
					continue;
				}
				offset = nameHash.get(forwarder.getModuleName());
				if (offset != null) {
					forwarder.setOffsetModuleName(offset.shortValue());
				}
				else {
					String moduleName = forwarder.getModuleName();
					if (moduleName != null && moduleName.length() > 0) {
						nameHash.put(moduleName, Short.valueOf((short)pos));
						forwarder.setOffsetModuleName((short)pos);
						pos += (forwarder.getModuleName().length() + 1);
					}
				}
			}
		}
	}
Returns the array of bound import descriptors defined in this bound import data directory.
@return the array of bound import descriptors defined in this bound import data directory
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/pe/BoundImportDataDirectory.java