projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd92a09
)
when resolving symbols with only weak defs, use first def, not last def
author
Rich Felker
<dalias@aerifal.cx>
Mon, 25 Jul 2011 13:22:05 +0000
(09:22 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 25 Jul 2011 13:22:05 +0000
(09:22 -0400)
src/ldso/dynlink.c
patch
|
blob
|
history
diff --git
a/src/ldso/dynlink.c
b/src/ldso/dynlink.c
index 6c4abbfe4f601f2188db3d64c0f8745fd642992d..7a26e9ed7ba21c6645860ac747138e999d39d2e9 100644
(file)
--- a/
src/ldso/dynlink.c
+++ b/
src/ldso/dynlink.c
@@
-107,6
+107,7
@@
static void *find_sym(struct dso *dso, const char *s, int need_def)
if (sym && (!need_def || sym->st_shndx) && sym->st_value
&& (1<<(sym->st_info&0xf) & OK_TYPES)
&& (1<<(sym->st_info>>4) & OK_BINDS)) {
+ if (def && sym->st_info>>4 == STB_WEAK) continue;
def = dso->base + sym->st_value;
if (sym->st_info>>4 == STB_GLOBAL) break;
}