mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
tcc_load_dll fix (Tao Wu)
This commit is contained in:
parent
aee0da0b17
commit
5487bc23c8
6
tccelf.c
6
tccelf.c
@ -2095,7 +2095,7 @@ static int tcc_load_dll(TCCState *s1, int fd, const char *filename, int level)
|
||||
{
|
||||
Elf32_Ehdr ehdr;
|
||||
Elf32_Shdr *shdr, *sh, *sh1;
|
||||
int i, nb_syms, nb_dts, sym_bind, ret;
|
||||
int i, j, nb_syms, nb_dts, sym_bind, ret;
|
||||
Elf32_Sym *sym, *dynsym;
|
||||
Elf32_Dyn *dt, *dynamic;
|
||||
unsigned char *dynstr;
|
||||
@ -2184,8 +2184,8 @@ static int tcc_load_dll(TCCState *s1, int fd, const char *filename, int level)
|
||||
switch(dt->d_tag) {
|
||||
case DT_NEEDED:
|
||||
name = dynstr + dt->d_un.d_val;
|
||||
for(i = 0; i < s1->nb_loaded_dlls; i++) {
|
||||
dllref = s1->loaded_dlls[i];
|
||||
for(j = 0; j < s1->nb_loaded_dlls; j++) {
|
||||
dllref = s1->loaded_dlls[j];
|
||||
if (!strcmp(name, dllref->name))
|
||||
goto already_loaded;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user