From 28435ec58c2ef9bb571cad5f8a1129aea3ecc204 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 13 May 2017 08:59:06 +0200 Subject: 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 --- tccpe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tccpe.c') diff --git a/tccpe.c b/tccpe.c index ff7c128..5877b2a 100644 --- a/tccpe.c +++ b/tccpe.c @@ -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); -- cgit v1.3.1