diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-09-19 10:04:05 -0700 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-09-26 09:37:18 -0700 |
commit | 534661b91c98492995274c364c8177c45efc63db (patch) | |
tree | 333c655a3159fdb72a693a7335ba347094dfd57a /ldso/ldso/sh/dl-sysdep.h | |
parent | d21497f9fba95688e464ae712bd6b4c0fbc4ea13 (diff) |
ldso/: tls support for dynamic linker
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'ldso/ldso/sh/dl-sysdep.h')
-rw-r--r-- | ldso/ldso/sh/dl-sysdep.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h index d4fc78402..7937ceb08 100644 --- a/ldso/ldso/sh/dl-sysdep.h +++ b/ldso/ldso/sh/dl-sysdep.h @@ -6,6 +6,7 @@ /* Define this if the system uses RELOCA. */ #define ELF_USES_RELOCA #include <elf.h> +#include <tls.h> /* * Initialization sequence for a GOT. */ @@ -88,9 +89,17 @@ _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 |