version 1.45, 1996/10/06 19:03:32 |
version 1.46, 1996/12/21 21:53:16 |
Line 958 lookup(name, src_map, strong) |
|
Line 958 lookup(name, src_map, strong) |
|
int strong; |
int strong; |
{ |
{ |
long common_size = 0; |
long common_size = 0; |
struct so_map *smp; |
struct so_map *smp, *weak_smp; |
struct rt_symbol *rtsp; |
struct rt_symbol *rtsp; |
|
struct nzlist *weak_np = 0; |
|
|
if ((rtsp = lookup_rts(name)) != NULL) |
if ((rtsp = lookup_rts(name)) != NULL) |
return rtsp->rt_sp; |
return rtsp->rt_sp; |
|
|
continue; |
continue; |
|
|
if (np->nz_type == N_UNDF+N_EXT && np->nz_value != 0) { |
if (np->nz_type == N_UNDF+N_EXT && np->nz_value != 0) { |
if (np->nz_other == AUX_FUNC) { |
if (N_AUX(&np->nlist) == AUX_FUNC) { |
/* It's a weak function definition */ |
/* It's a `weak' function definition */ |
if (strong) |
if (strong) |
continue; |
continue; |
} else { |
} else { |
|
|
continue; |
continue; |
} |
} |
} |
} |
|
if (N_BIND(&np->nlist) == BIND_WEAK && weak_np == 0) { |
|
weak_np = np; |
|
weak_smp = smp; |
|
continue; |
|
} |
|
|
*src_map = smp; |
*src_map = smp; |
return np; |
return np; |
} |
} |
|
|
|
if (weak_np) { |
|
*src_map = weak_smp; |
|
return weak_np; |
|
} |
|
|
if (common_size == 0) |
if (common_size == 0) |
/* Not found */ |
/* Not found */ |
return NULL; |
return NULL; |