summaryrefslogtreecommitdiff
path: root/ldso/ldso/metag/dl-sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso/metag/dl-sysdep.h')
-rw-r--r--ldso/ldso/metag/dl-sysdep.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/ldso/ldso/metag/dl-sysdep.h b/ldso/ldso/metag/dl-sysdep.h
index 29547cb34..257ca610f 100644
--- a/ldso/ldso/metag/dl-sysdep.h
+++ b/ldso/ldso/metag/dl-sysdep.h
@@ -36,14 +36,17 @@ extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entr
#define PAGE_ALIGN (~ADDR_ALIGN)
#define OFFS_ALIGN (PAGE_ALIGN & ~(1ul << (sizeof(_dl_pagesize) * 8 - 1)))
-/* The union of reloc-type-classes where the reloc TYPE is a member.
-
- TYPE is in the class ELF_RTYPE_CLASS_NOCOPY if it should not be allowed
- to resolve to one of the main executable's symbols, as for a COPY
- reloc. */
-#define elf_machine_type_class(type) \
- (((((type) == R_METAG_JMP_SLOT)) * ELF_RTYPE_CLASS_PLT) \
- | (((type) == R_METAG_COPY) * ELF_RTYPE_CLASS_COPY))
+/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ TLS variable, so undefined references should not be allowed to
+ 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. */
+#define elf_machine_type_class(type) \
+ ((((type) == R_METAG_JMP_SLOT || (type) == R_METAG_TLS_DTPMOD \
+ || (type) == R_METAG_TLS_DTPOFF || (type) == R_METAG_TLS_TPOFF) \
+ * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_METAG_COPY) * ELF_RTYPE_CLASS_COPY))
static inline Elf32_Addr
elf_machine_dynamic(Elf32_Ehdr *header)