summaryrefslogtreecommitdiff
path: root/ldso/ldso/x86_64
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-05-03 16:36:15 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-05-03 16:36:15 +0200
commitc5f87c865e72d527c85b879be67b5a6fc0cab349 (patch)
treeda870709ace28d61860633dc1b608b58c6da6dc4 /ldso/ldso/x86_64
parentfa08223a332b825895e820a2b1d1c3418f358b18 (diff)
x86_64: silence warning if !TLS
TODO: fix all other arches Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'ldso/ldso/x86_64')
-rw-r--r--ldso/ldso/x86_64/elfinterp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ldso/ldso/x86_64/elfinterp.c b/ldso/ldso/x86_64/elfinterp.c
index 27b1a15fd..efe9d546c 100644
--- a/ldso/ldso/x86_64/elfinterp.c
+++ b/ldso/ldso/x86_64/elfinterp.c
@@ -157,7 +157,9 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
int reloc_type;
int symtab_index;
char *symname;
- struct elf_resolve *tls_tpnt = NULL;
+#if defined USE_TLS && USE_TLS
+ struct elf_resolve *tls_tpnt;
+#endif
struct symbol_ref sym_ref;
ElfW(Addr) *reloc_addr;
ElfW(Addr) symbol_addr;
@@ -186,13 +188,17 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
/* This may be non-fatal if called from dlopen. */
return 1;
}
+#if defined USE_TLS && USE_TLS
tls_tpnt = sym_ref.tpnt;
+#endif
} else {
/* Relocs against STN_UNDEF are usually treated as using a
* symbol value of zero, and using the module containing the
* reloc itself. */
symbol_addr = sym_ref.sym->st_value;
+#if defined USE_TLS && USE_TLS
tls_tpnt = tpnt;
+#endif
}