diff options
| author | grischka <grischka> | 2017-05-13 08:59:06 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2017-05-13 08:59:06 +0200 |
| commit | 28435ec58c2ef9bb571cad5f8a1129aea3ecc204 (patch) | |
| tree | a08b77f90c9c24972e0fccd6c223af73b5b240f6 /tccpe.c | |
| parent | 3a9d6b3655bd15e752e65a4f0f23f64f4ec56fe1 (diff) | |
| download | tinycc-28435ec58c2ef9bb571cad5f8a1129aea3ecc204.tar.gz tinycc-28435ec58c2ef9bb571cad5f8a1129aea3ecc204.tar.bz2 | |
configure: --config-musl/-uClibc switch & misc cleanups
- configure:
- add --config-uClibc,-musl switch and suggest to use
it if uClibc/musl is detected
- make warning options magic clang compatible
- simplify (use $confvars instead of individual options)
- Revert "Remove some unused-parameter lint"
7443db0d5f841b81a55e918bf8c228dd20f9ddb2
rather use -Wno-unused-parameter (or just not -Wextra)
- #ifdef functions that are unused on some targets
- tccgen.c: use PTR_SIZE==8 instead of (X86_64 || ARM64)
- tccpe.c: fix some warnings
- integrate dummy arm-asm better
Diffstat (limited to 'tccpe.c')
| -rw-r--r-- | tccpe.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -381,7 +381,7 @@ struct pe_info { static const char *pe_export_name(TCCState *s1, ElfW(Sym) *sym) { - const char *name = symtab_section->link->data + sym->st_name; + const char *name = (char*)symtab_section->link->data + sym->st_name; if (s1->leading_underscore && name[0] == '_' && !(sym->st_other & ST_PE_STDCALL)) return name + 1; return name; @@ -835,7 +835,7 @@ static void pe_build_imports(struct pe_info *pe) int sym_index = p->symbols[k]->sym_index; ElfW(Sym) *imp_sym = (ElfW(Sym) *)pe->s1->dynsymtab_section->data + sym_index; ElfW(Sym) *org_sym = (ElfW(Sym) *)symtab_section->data + iat_index; - const char *name = pe->s1->dynsymtab_section->link->data + imp_sym->st_name; + const char *name = (char*)pe->s1->dynsymtab_section->link->data + imp_sym->st_name; int ordinal; org_sym->st_value = thk_ptr; @@ -1237,7 +1237,7 @@ static int pe_check_symbols(struct pe_info *pe) sym = (ElfW(Sym) *)symtab_section->data + sym_index; if (sym->st_shndx == SHN_UNDEF) { - const char *name = symtab_section->link->data + sym->st_name; + const char *name = (char*)symtab_section->link->data + sym->st_name; unsigned type = ELFW(ST_TYPE)(sym->st_info); int imp_sym = pe_find_import(pe->s1, sym); struct import_symbol *is; @@ -1648,7 +1648,7 @@ static int pe_load_res(TCCState *s1, int fd) if (hdr.filehdr.Machine != IMAGE_FILE_MACHINE || hdr.filehdr.NumberOfSections != 1 - || strcmp(hdr.sectionhdr.Name, ".rsrc") != 0) + || strcmp((char*)hdr.sectionhdr.Name, ".rsrc") != 0) goto quit; rsrc_section = new_section(s1, ".rsrc", SHT_PROGBITS, SHF_ALLOC); |
