Explorar el Código

fix bug in dladdr that prevented resolving addresses in the PLT

Rich Felker hace 12 años
padre
commit
cdc5c74c6a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/ldso/dynlink.c

+ 1 - 1
src/ldso/dynlink.c

@@ -1188,7 +1188,7 @@ int __dladdr(void *addr, Dl_info *info)
 	}
 
 	for (; nsym; nsym--, sym++) {
-		if (sym->st_shndx && sym->st_value
+		if (sym->st_value
 		 && (1<<(sym->st_info&0xf) & OK_TYPES)
 		 && (1<<(sym->st_info>>4) & OK_BINDS)) {
 			void *symaddr = p->base + sym->st_value;