diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-10-21 15:36:17 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2007-10-21 15:36:17 +0000 |
commit | 77b4b9f9b6277e21af26bd80cdaf3924f818d7a0 (patch) | |
tree | 0af6f0b45a3889045e1f6ab0a1d8df582ebafe7a | |
parent | 34dce38bace53f0910b39b57319f8e998303a0b3 (diff) |
Handle STT_COMMON symbols too. Following binutils release
will set the type of common symbols to STT_COMMON
instead of STT_OBJECTS, so the dynamic linker needs
to handle this type os symbols too.
Same changes have been added to glibc (See: bugzilla #5104).
This patch ensures the uclibc will work with later bintuils.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r-- | ldso/ldso/dl-hash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index c19afb473..2d5ecddbb 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -177,7 +177,12 @@ char *_dl_find_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve * continue; if (sym->st_value == 0) continue; - if (ELF_ST_TYPE(sym->st_info) > STT_FUNC) + if (ELF_ST_TYPE(sym->st_info) > STT_FUNC + && ELF_ST_TYPE(sym->st_info) != STT_COMMON) + /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC + * and STT_COMMON entries since these are no + * code/data definitions + */ continue; if (_dl_strcmp(strtab + sym->st_name, name) != 0) continue; |