Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __IR_BWRITE_H__
00037 #define __IR_BWRITE_H__
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00043
00044
00045
00046
00047
00048 #ifdef BACK_END
00049 extern BOOL Write_BE_Maps;
00050 extern BOOL Write_AC_INTERNAL_Map;
00051 extern BOOL Write_ALIAS_CLASS_Map;
00052 #endif
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 typedef struct section {
00065 char *name;
00066 Elf64_Shdr shdr;
00067 } Section;
00068
00069
00070 typedef struct output_file {
00071 const char *file_name;
00072 INT output_fd;
00073 char *map_addr;
00074 off_t mapped_size;
00075 off_t file_size;
00076 Section *section_list;
00077 INT max_num_of_section;
00078 INT num_of_section;
00079 Section *cur_section;
00080 } Output_File;
00081
00082
00083 extern Output_File *Current_Output;
00084
00085
00086 extern Output_File *WN_open_output (const char *file_name);
00087 extern void WN_close_output (Output_File *fl);
00088 extern void WN_close_file (void *fl);
00089
00090
00091
00092
00093
00094
00095
00096 extern void WN_write_globals (Output_File *fl);
00097 extern void WN_write_dst (void *dst, Output_File *fl);
00098 extern void WN_write_strtab (const void *strtab, UINT64 size, Output_File *fl);
00099 extern void WN_write_localmap (void *localmap, Output_File *fl);
00100 extern void IPA_write_summary (void (*IPA_irb_write_summary) (Output_File*),
00101 Output_File *fl);
00102 extern void IPA_copy_PU(PU_Info *pu, char *section_base, Output_File *outfile);
00103
00104 extern void WN_write_flags (INT argc, char **argv, Output_File *fl);
00105 extern void WN_write_revision (Output_File *fl);
00106 extern void WN_close_file (void *this_fl);
00107
00108
00109
00110
00111
00112
00113
00114
00115 extern void WN_write_PU_Infos (PU_Info *pu_list, Output_File *fl);
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125 extern void WN_write_tree (PU_Info *pu, WN_MAP off_map, Output_File *fl);
00126 extern void WN_write_symtab (PU_Info *pu, Output_File *fl);
00127 extern void WN_write_depgraph (PU_Info *pu, WN_MAP off_map, Output_File *fl);
00128 extern void WN_write_prefetch (PU_Info *pu, WN_MAP off_map, Output_File *fl);
00129 extern void WN_write_feedback (PU_Info *pu, Output_File *fl);
00130 extern void WN_write_INT32_map(PU_Info *pu,
00131 WN_MAP off_map,
00132 Output_File *fl,
00133 INT32 subsection_type,
00134 WN_MAP value_map,
00135 const char *subsection_name);
00136 extern void WN_write_voidptr_map(PU_Info *pu,
00137 WN_MAP off_map,
00138 Output_File *fl,
00139 INT32 subsection_type,
00140 WN_MAP value_map,
00141 const char *subsection_name);
00142 #ifndef OWN_ERROR_PACKAGE
00143
00144
00145
00146
00147
00148
00149 extern Output_File *Open_Output_Info (const char *output_file);
00150 extern void Write_PU_Info (PU_Info *pu);
00151 extern void Write_Global_Info (PU_Info *pu_tree);
00152 extern void Close_Output_Info (void);
00153 extern void WN_write_elf_symtab (const void* symtab, UINT64 size,
00154 UINT64 entsize, UINT align, Output_File* fl);
00155
00156 #endif
00157
00158 #ifdef __cplusplus
00159 }
00160 #endif
00161
00162 #endif