2 * image-writer.h: Creation of object files or assembly files using the same interface.
5 * Dietmar Maurer (dietmar@ximian.com);
6 * Zoltan Varga (vargaz@gmail.com);
7 * Paolo Molaro (lupus@ximian.com);
9 * (C); 2002 Ximian, Inc.
12 #ifndef __MONO_IMAGE_WRITER_H__
13 #define __MONO_IMAGE_WRITER_H__
20 #include <mono/utils/mono-compiler.h>
22 typedef struct _MonoImageWriter MonoImageWriter
;
24 /* Relocation types */
26 #define R_ARM_ALU_PC_G0_NC 59
28 gboolean
bin_writer_supported (void) MONO_INTERNAL
;
30 MonoImageWriter
* img_writer_create (FILE *fp
, gboolean use_bin_writer
) MONO_INTERNAL
;
32 void img_writer_destroy (MonoImageWriter
*w
) MONO_INTERNAL
;
34 void img_writer_emit_start (MonoImageWriter
*w
) MONO_INTERNAL
;
36 int img_writer_emit_writeout (MonoImageWriter
*w
) MONO_INTERNAL
;
38 void img_writer_emit_section_change (MonoImageWriter
*w
, const char *section_name
, int subsection_index
) MONO_INTERNAL
;
40 void img_writer_emit_push_section (MonoImageWriter
*w
, const char *section_name
, int subsection
) MONO_INTERNAL
;
42 void img_writer_emit_pop_section (MonoImageWriter
*w
) MONO_INTERNAL
;
44 void img_writer_emit_global (MonoImageWriter
*w
, const char *name
, gboolean func
) MONO_INTERNAL
;
46 void img_writer_emit_local_symbol (MonoImageWriter
*w
, const char *name
, const char *end_label
, gboolean func
) MONO_INTERNAL
;
48 void img_writer_emit_label (MonoImageWriter
*w
, const char *name
) MONO_INTERNAL
;
50 void img_writer_emit_bytes (MonoImageWriter
*w
, const guint8
* buf
, int size
) MONO_INTERNAL
;
52 void img_writer_emit_string (MonoImageWriter
*w
, const char *value
) MONO_INTERNAL
;
54 void img_writer_emit_line (MonoImageWriter
*w
) MONO_INTERNAL
;
56 void img_writer_emit_alignment (MonoImageWriter
*w
, int size
) MONO_INTERNAL
;
58 void img_writer_emit_pointer_unaligned (MonoImageWriter
*w
, const char *target
) MONO_INTERNAL
;
60 void img_writer_emit_pointer (MonoImageWriter
*w
, const char *target
) MONO_INTERNAL
;
62 void img_writer_emit_int16 (MonoImageWriter
*w
, int value
) MONO_INTERNAL
;
64 void img_writer_emit_int32 (MonoImageWriter
*w
, int value
) MONO_INTERNAL
;
66 void img_writer_emit_symbol_diff (MonoImageWriter
*w
, const char *end
, const char* start
, int offset
) MONO_INTERNAL
;
68 void img_writer_emit_zero_bytes (MonoImageWriter
*w
, int num
) MONO_INTERNAL
;
70 void img_writer_emit_global (MonoImageWriter
*w
, const char *name
, gboolean func
) MONO_INTERNAL
;
72 void img_writer_emit_byte (MonoImageWriter
*w
, guint8 val
) MONO_INTERNAL
;
74 void img_writer_emit_reloc (MonoImageWriter
*acfg
, int reloc_type
, const char *symbol
, int addend
) MONO_INTERNAL
;
76 void img_writer_emit_unset_mode (MonoImageWriter
*acfg
) MONO_INTERNAL
;