From 1f5e333a158f4398437287b8b64260371422194f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 15 Oct 2009 16:15:59 -0400 Subject: ldso: clean up breakage in tls merge The TLS merge 534661b91c9849 introduced multiple style problems as well as random breakage: - missing _dl_free - incomplete parametrization of _dl_lookup_hash - restore FDPIC handling in _dl_lookup_hash Signed-off-by: Mike Frysinger --- ldso/ldso/sh/dl-sysdep.h | 2 +- ldso/ldso/sh/elfinterp.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'ldso/ldso/sh') diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h index 7937ceb08..56e1820f3 100644 --- a/ldso/ldso/sh/dl-sysdep.h +++ b/ldso/ldso/sh/dl-sysdep.h @@ -99,7 +99,7 @@ _dl_urem(unsigned int n, unsigned int base) #define elf_machine_type_class(type) \ ((((type) == R_SH_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY)) -#endif +#endif /* Return the link-time address of _DYNAMIC. Conveniently, this is the first element of the GOT. This must be inlined in a function which diff --git a/ldso/ldso/sh/elfinterp.c b/ldso/ldso/sh/elfinterp.c index cce563e23..594da53aa 100644 --- a/ldso/ldso/sh/elfinterp.c +++ b/ldso/ldso/sh/elfinterp.c @@ -160,8 +160,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope, unsigned long old_val; #endif -struct elf_resolve *tls_tpnt = NULL; - + struct elf_resolve *tls_tpnt = NULL; reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset); reloc_type = ELF32_R_TYPE(rpnt->r_info); @@ -197,7 +196,7 @@ struct elf_resolve *tls_tpnt = NULL; /* In case of a TLS reloc, tls_tpnt NULL means we have an 'anonymous' symbol. This is the case for a static tls variable, so the lookup module is just that one is referencing the tls variable. */ - if(!tls_tpnt) + if (!tls_tpnt) tls_tpnt = tpnt; #endif switch (reloc_type) { -- cgit v1.2.3