summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorYann Sionneau <ysionneau@kalray.eu>2020-09-22 14:16:58 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2020-09-22 15:54:04 +0200
commit05c39a2243c336600e9051743ba9b64b3d3aa0b4 (patch)
tree412ea8846dc321d2b2f28a6c71e06594fa190f44 /ldso
parentcc2b7bf5dd11b6cd0f577ca9d3d387ed344b14f8 (diff)
Fix unused variable warning in dl-startup.c
SEND_STDERR_DEBUG does nothing if __SUPPORT_LD_DEBUG_EARLY__ is not defined thus causing a warning. Fixes this: In file included from ldso/ldso/ldso.c:86:0: ldso/ldso/dl-startup.c: In function '_dl_start': ldso/ldso/dl-startup.c:313:13: warning: variable 'strtab' set but not used [-Wunused-but-set-variable] char *strtab; ^~~~~~ Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/dl-startup.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 1b559a855..24b046c62 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -310,11 +310,13 @@ DL_START(unsigned long args)
symbol_addr = 0;
sym = NULL;
if (symtab_index) {
- char *strtab;
ElfW(Sym) *symtab;
+#if !defined(EARLY_STDERR_SPECIAL) && defined(__SUPPORT_LD_DEBUG_EARLY__)
+ char *strtab;
+ strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
+#endif
symtab = (ElfW(Sym) *) tpnt->dynamic_info[DT_SYMTAB];
- strtab = (char *) tpnt->dynamic_info[DT_STRTAB];
sym = &symtab[symtab_index];
symbol_addr = (unsigned long) DL_RELOC_ADDR(load_addr, sym->st_value);
#if !defined(EARLY_STDERR_SPECIAL)