diff options
| author | rajdakin <rajdakin@gmail.com> | 2024-07-09 08:21:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-09 08:21:21 +0200 |
| commit | 605d5a29c067fa4834340182ab96438673d09a12 (patch) | |
| tree | 3fc4d93603319405ab4a3f7a8c0a59eef1c5d71f /src/elfs | |
| parent | fdc7e9d1e4d4ab0dd7e895645739fd57e416d5e3 (diff) | |
| download | box64-605d5a29c067fa4834340182ab96438673d09a12.tar.gz box64-605d5a29c067fa4834340182ab96438673d09a12.zip | |
Fixes (#1659)
* Replaced some tabs with spaces * Fixed some signedness warnings * Added more debug info * Fixed an improper alignment * [WRAPPEDWAYLAND] Added return statements to wrappers * [EMU] [AVX] Fixed some issues * [ARM DYNAREC] Fixed some minor warnings * [ARM DYNAREC] Removed unused macro arguments * [EMU] Fixed a noisy warning * [ARM DYNAREC] Removed "empty body" warnings * [EMU] Fixed an opcode in dynarec, non-cosim builds * [LA64 DYNAREC] Minor warning fixes * [LA64 DYNAREC] Fixed empty body warnings * [LA64 DYNAREC] Added parenthesis around assignments in if statements * [LA64 DYNAREC] Fixed missing parenthesis in macro definitions * [RV64 DYNAREC] Fixed minor warnings * [RV64 DYNAREC] Fixed wrong/missing parentheses * [WRAPPER] Fixed the WaylandClient callback signatures
Diffstat (limited to 'src/elfs')
| -rw-r--r-- | src/elfs/elfhash.c | 4 | ||||
| -rw-r--r-- | src/elfs/elfloader.c | 4 | ||||
| -rw-r--r-- | src/elfs/elfparser.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/elfs/elfhash.c b/src/elfs/elfhash.c index c0a62b51..fefb0e7f 100644 --- a/src/elfs/elfhash.c +++ b/src/elfs/elfhash.c @@ -325,7 +325,7 @@ Elf64_Sym* ElfSymTabLookup(elfheader_t* h, const char* symname) { if(!h->SymTab) return 0; - for(int i=0; i<h->numSymTab; ++i) { + for(size_t i=0; i<h->numSymTab; ++i) { Elf64_Sym* sym = &h->SymTab[i]; int type = ELF64_ST_TYPE(sym->st_info); if(type==STT_FUNC || type==STT_TLS || type==STT_OBJECT) { @@ -341,7 +341,7 @@ Elf64_Sym* ElfDynSymLookup(elfheader_t* h, const char* symname) { if(!h->DynSym) return 0; - for(int i=0; i<h->numDynSym; ++i) { + for(size_t i=0; i<h->numDynSym; ++i) { Elf64_Sym* sym = &h->DynSym[i]; int type = ELF64_ST_TYPE(sym->st_info); if(type==STT_FUNC || type==STT_TLS || type==STT_OBJECT) { diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c index fab47ad6..016ae50b 100644 --- a/src/elfs/elfloader.c +++ b/src/elfs/elfloader.c @@ -296,7 +296,7 @@ int AllocLoadElfMemory(box64context_t* context, elfheader_t* head, int mainbin) ssize_t new_size = asize + (paddr-new_addr); // so need new_size to compensate while(getProtection(new_addr) && (new_size>0)) {// but then, there might be some overlap uintptr_t diff = ALIGN(new_addr+1) - new_addr; // next page - if(diff<new_size) + if(diff<(size_t)new_size) new_size -= diff; else new_size = 0; @@ -941,7 +941,7 @@ uintptr_t GetLastByte(elfheader_t* h) } #ifndef STB_GNU_UNIQUE -#define STB_GNU_UNIQUE 10 +#define STB_GNU_UNIQUE 10 #endif void checkHookedSymbols(elfheader_t* h); // in mallochook.c diff --git a/src/elfs/elfparser.c b/src/elfs/elfparser.c index 545503c9..49fea7aa 100644 --- a/src/elfs/elfparser.c +++ b/src/elfs/elfparser.c @@ -14,7 +14,7 @@ #define PN_XNUM (0xffff) #endif #ifndef DT_GNU_HASH -#define DT_GNU_HASH 0x6ffffef5 +#define DT_GNU_HASH 0x6ffffef5 #endif int LoadSH(FILE *f, Elf64_Shdr *s, void** SH, const char* name, uint32_t type) @@ -405,4 +405,4 @@ const char* BindSym(int bind) static char tmp[50]; sprintf(tmp, "??? 0x%x", bind); return tmp; -} \ No newline at end of file +} |