Unified · Split
| @@ -940,7 +940,7 @@ int tcc_load_coff(TCCState * s1, int fd) · 939 unmodified lines | ||
| 940 | 940 | if (name[0] == '_' && strcmp(name, "_main") != 0) |
| 941 | 941 | name++; |
| 942 | 942 | |
| 943 | − tcc_add_symbol(s1, name, csym.n_value); | |
| 943 | + tcc_add_symbol(s1, name, (void*)csym.n_value); | |
| 944 | 944 | } |
| 945 | 945 | // skip any aux records |
| 946 | 946 | |
| @@ -177,7 +177,7 @@ void *tcc_get_symbol(TCCState *s, const char *name) · 176 unmodified lines | ||
| 177 | 177 | if (!sym_index) |
| 178 | 178 | return NULL; |
| 179 | 179 | sym = &((ElfW(Sym) *)symtab_section->data)[sym_index]; |
| 180 | − return (void*)sym->st_value; | |
| 180 | + return (void*)(long)sym->st_value; | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | void *tcc_get_symbol_err(TCCState *s, const char *name) |