diff options
author | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-12-16 13:12:00 +0100 |
---|---|---|
committer | Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> | 2009-12-17 13:45:51 +0100 |
commit | f3217f9be3225c4943677d03b274cbc0cb4ed228 (patch) | |
tree | cd994714586789ad2d039b62e5411406176e0396 /ldso/ldso/dl-hash.c | |
parent | 02a89fe640faeb77920643190bff29894e503d64 (diff) |
check if USE_TLS is defined before use
This patch will convert all the #ifdef USE_TLS and #if USE_TLS to
#if defined(USE_TLS) && USE_TLS.
By checking if the USE_TLS is defined before checking its value will result in
correct behavior for architectures not defining this config symbol.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
Diffstat (limited to 'ldso/ldso/dl-hash.c')
-rw-r--r-- | ldso/ldso/dl-hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c index 6d54f37b9..0048734ba 100644 --- a/ldso/ldso/dl-hash.c +++ b/ldso/ldso/dl-hash.c @@ -158,7 +158,7 @@ static __attribute_noinline__ const ElfW(Sym) * check_match (const ElfW(Sym) *sym, char *strtab, const char* undef_name, int type_class) { -#if USE_TLS +#if defined(USE_TLS) && USE_TLS if ((sym->st_value == 0 && (ELF_ST_TYPE(sym->st_info) != STT_TLS)) || (type_class & (sym->st_shndx == SHN_UNDEF))) /* No value or undefined symbol itself */ @@ -335,7 +335,7 @@ char *_dl_lookup_hash(const char *name, struct dyn_elf *rpnt, struct elf_resolve if (sym) { /* At this point we have found the requested symbol, do binding */ -#if USE_TLS +#if defined(USE_TLS) && USE_TLS if (ELF_ST_TYPE(sym->st_info) == STT_TLS) { _dl_assert(tpntp != NULL); *tpntp = tpnt; |