1 /*
2  * %CopyrightBegin%
3  *
4  * Copyright Ericsson AB 2016. All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * %CopyrightEnd%
19  */
20 /*
21  * hipe_load.h
22  *
23  * HiPE atomic code loader
24  */
25 #ifndef HIPE_LOAD_H
26 #define HIPE_LOAD_H
27 
28 #include "global.h"
29 
30 typedef struct hipe_loader_state {
31     Eterm module;                   /* Module name, atom */
32 
33     void *text_segment;
34     Uint text_segment_size;
35 
36     void *data_segment;
37     Uint data_segment_size;
38 
39     struct hipe_ref* new_hipe_refs;
40     struct hipe_sdesc* new_hipe_sdesc;
41 
42 } HipeLoaderState;
43 
44 extern Binary *hipe_alloc_loader_state(Eterm module);
45 extern void hipe_free_loader_state(HipeLoaderState*);
46 extern HipeLoaderState *hipe_get_loader_state(Binary *binary);
47 
48 #endif /* HIPE_LOAD_H */
49