[git commit master] ldso_sh: Provide only one definition for elf_machine_type_class

Carmelo Amoroso carmelo.amoroso at st.com
Sun Apr 11 20:56:05 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=625b805068561d121baf226cd67cb7aa6e6ba7ba
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

It doesn't need to provide different definition of elf_machine_type_class
macro depending on TLS support.
It also fixes build for sh architecture when thread support is off:
  CC ldso/ldso/ldso.oS
In file included from ./ldso/ldso/sh/dl-sysdep.h:9,
                 from ./ldso/include/dl-string.h:11,
                 from ./ldso/include/ldso.h:40,
                 from ldso/ldso/ldso.c:33:
./include/tls.h:6:22: error: tls.h: No such file or directory
make: *** [ldso/ldso/ldso.oS] Error 1

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
 ldso/ldso/sh/dl-sysdep.h |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h
index 56e1820..21244ec 100644
--- a/ldso/ldso/sh/dl-sysdep.h
+++ b/ldso/ldso/sh/dl-sysdep.h
@@ -6,7 +6,6 @@
 /* Define this if the system uses RELOCA.  */
 #define ELF_USES_RELOCA
 #include <elf.h>
-#include <tls.h>
 /*
  * Initialization sequence for a GOT.
  */
@@ -89,17 +88,11 @@ _dl_urem(unsigned int n, unsigned int base)
    define the value.
    ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
    of the main executable's symbols, as for a COPY reloc.  */
-#if defined USE_TLS
 # define elf_machine_type_class(type) \
   ((((type) == R_SH_JMP_SLOT || (type) == R_SH_TLS_DTPMOD32		      \
      || (type) == R_SH_TLS_DTPOFF32 || (type) == R_SH_TLS_TPOFF32)	      \
     * ELF_RTYPE_CLASS_PLT)						      \
    | (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY))
-#else
-#define elf_machine_type_class(type) \
-  ((((type) == R_SH_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)	\
-   | (((type) == R_SH_COPY) * ELF_RTYPE_CLASS_COPY))
-#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
-- 
1.6.3.3



More information about the uClibc-cvs mailing list