summaryrefslogtreecommitdiff
path: root/ldso/ldso/i386/dl-sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso/i386/dl-sysdep.h')
-rw-r--r--ldso/ldso/i386/dl-sysdep.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ldso/ldso/i386/dl-sysdep.h b/ldso/ldso/i386/dl-sysdep.h
index 6e84861e4..a66c80212 100644
--- a/ldso/ldso/i386/dl-sysdep.h
+++ b/ldso/ldso/i386/dl-sysdep.h
@@ -31,7 +31,9 @@ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_ent
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_386_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ ((((type) == R_386_JMP_SLOT || (type) == R_386_TLS_DTPMOD32 \
+ || (type) == R_386_TLS_DTPOFF32 || (type) == R_386_TLS_TPOFF32 \
+ || (type) == R_386_TLS_TPOFF) * ELF_RTYPE_CLASS_PLT) \
| (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY))
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
@@ -55,9 +57,10 @@ elf_machine_load_address (void)
it to assembly. We need a dummy reference to some global variable
via the GOT to make sure the compiler initialized %ebx in time. */
Elf32_Addr addr;
+ int tmp;
__asm__ ("leal _dl_start@GOTOFF(%%ebx), %0\n"
"subl _dl_start@GOT(%%ebx), %0"
- : "=r" (addr) : "m" (_dl_errno) : "cc");
+ : "=r" (addr) : "m" (tmp) : "cc");
return addr;
}