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
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #include <stdio.h>
00050 #include <unistd.h>
00051 #include <fcntl.h>
00052 #include <sys/stat.h>
00053 #include <errno.h>
00054 #include <bstring.h>
00055 #include <elf.h>
00056 #include <elfaccess.h>
00057 #include <libelf.h>
00058 #include <stamp.h>
00059 #include <alloca.h>
00060 #include <cmplrs/leb128.h>
00061 #include <cmplrs/elf_interfaces.h>
00062 #include <sys/unwindP.h>
00063
00064 #define USE_STANDARD_TYPES 1
00065 #include "defs.h"
00066 #include "erlib.h"
00067 #include "erglob.h"
00068 #include "config.h"
00069 #include "targ_const.h"
00070 #include "glob.h"
00071 #include "config.h"
00072 #include "config_elf_targ.h"
00073 #include "em_elf.h"
00074
00075 INT GP_DISP = 0;
00076
00077 pSCNINFO Interface_Scn;
00078
00079 void Em_Write_Reginfo (
00080 Elf64_Addr gprvalue,
00081 Elf64_Word gprmask,
00082 Elf64_Word fprmask,
00083 BOOL pure_abi)
00084 {
00085
00086
00087 return;
00088
00089 #if 0
00090 if (Sixtyfour_Bit) {
00091 if (Get_Elf_Target_Machine() == EM_IA_64) {
00092 Elf_IA64_RegInfo reginfo_ia64;
00093 reginfo_ia64.ri_gp_value = gprvalue;
00094 Em_Add_New_Option (ODK_IA64_REGINFO, SHN_UNDEF,0, ®info_ia64, sizeof(reginfo_ia64));
00095 }
00096 }
00097 else {
00098 ErrMsg(EC_Assertion, __FILE__, __LINE__, "NYI - n32 reginfo");
00099 }
00100 #endif
00101 }
00102
00103
00104 void
00105 Em_Add_New_Option (
00106 Elf32_Byte option_kind,
00107 Elf32_Section option_section,
00108 Elf32_Word option_info,
00109 void *buffer,
00110 Elf32_Byte length)
00111 {
00112 Elf_Options option;
00113 #if 0 // don't put out options period. Its not defined in ABI
00114 if (Options_Scn == NULL) {
00115 Options_Scn = Em_New_Section (IA64_OPTIONS, SHT_IRIX_OPTIONS,
00116 SHF_ALLOC | SHF_IRIX_NOSTRIP, 0,
00117 ELF64_FSZ_XWORD);
00118 }
00119 option.kind = option_kind;
00120 option.size = sizeof (Elf_Options);
00121 option.section = option_section;
00122 option.info = option_info;
00123 option.size += Roundup (length, 8);
00124 Em_Add_Bytes_To_Scn (Options_Scn, &option, sizeof(option), ELF64_FSZ_WORD);
00125 if (length != 0) {
00126 Em_Add_Bytes_To_Scn (Options_Scn, buffer, length, ELF64_FSZ_WORD);
00127 }
00128 #else
00129 return;
00130 #endif
00131 }
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144 void
00145 Em_Add_New_Event (
00146 Elf64_Word ev_kind,
00147 Elf64_Word ev_ofst,
00148 Elf64_Word operand1,
00149 Elf64_Word operand2,
00150 Elf64_Word operand3,
00151 pSCNINFO scn)
00152 {
00153 return;
00154 }
00155
00156
00157
00158 void
00159 Em_Add_New_Content (
00160 Elf64_Word con_kind,
00161 Elf64_Xword con_ofst,
00162 Elf64_Word operand1,
00163 Elf64_Word operand2,
00164 pSCNINFO scn)
00165 {
00166 return;
00167 }
00168
00169 void
00170 Em_End_Unwind (FILE *trace_file, pSCNINFO text_scn)
00171 {
00172 if (trace_file) {
00173
00174
00175 unwind_process (unwind_dump2ascii, (void *) trace_file);
00176 }
00177 unwind_process (unwind_dump2elf, text_scn);
00178 }
00179
00180 void
00181 Em_Cleanup_Unwind (void)
00182 {
00183 unwind_cleanup();
00184 }
00185