definition module ObjectToMem;

import
	StdString,
	State;
	
import DLState;
import UnknownModuleOrSymbol;
//from ioTypes import IOState;
//1.3
from deltaIOState import IOState;
from pdObjectToMem import WriteImageInfo;
//3.1
/*2.0
from deltaIOState import ::IOState;
from pdObjectToMem import ::WriteImageInfo;
0.2*/
	
	
//NewLinkerFunction3 :: [ModuleOrSymbolUnknown] !*DLClientState !*DLServerState !*(IOState *DLServerState) -> !*(!Bool,[Int],!*DLClientState,!*DLServerState,!*IOState !*DLServerState);

//NewLinkerFunction2 :: [ModuleOrSymbolUnknown] !*DLClientState !*DLServerState !*(IOState *DLServerState) -> !*(!Bool,[Int],!*DLClientState,!*DLServerState,!*IOState !*DLServerState);
NewLinkerFunction2 unknown_modules_or_symbols dl_client_state dl_server_state io
	:== NewLinkerFunction2a True unknown_modules_or_symbols dl_client_state dl_server_state io;
	

NewLinkerFunction2a :: !Bool [ModuleOrSymbolUnknown] !*DLClientState !*DLServerState !*(IOState *DLServerState) -> !*(!Bool,[Int],!*DLClientState,!*DLServerState,!*IOState !*DLServerState);


InitialLink2 :: /*!String*/ !*DLClientState !*DLServerState !*(IOState *DLServerState) -> !*(!Int,!*DLClientState,!*DLServerState,!*IOState !*DLServerState);


//
//LinkUnknownSymbols :: ![.ModuleOrSymbolUnknown] !*State *(IOState *a) -> *(*(.[Int],*State),*IOState *a);
//LinkUnknownSymbols :: ![.ModuleOrSymbolUnknown] !*State *(IOState *a) -> *(*(!WriteImageInfo,.[Int],*State),*IOState *a);
LinkUnknownSymbols :: ![.ModuleOrSymbolUnknown] !*State !Int !*DLClientState *(IOState *a) -> *(*(!Maybe !WriteImageInfo,.[Int],*State,!*DLClientState),*IOState *a);

//replace_section_label_by_label :: !Symbol !Int !Int !*State -> (!Int,!*State);

replace_section_label_by_label2 :: !Int !Int !*State -> (!Int,!*State);
