+2011-10-26 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/dl-machine.h, sysdeps/unix/arm/sysdep.S: Restore
+ cases for use in rtld.
+
2011-10-05 Andreas Schwab <schwab@redhat.com>
* sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela)
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) \
+#ifndef RTLD_BOOTSTRAP
+# define elf_machine_type_class(type) \
((((type) == R_ARM_JUMP_SLOT || (type) == R_ARM_TLS_DTPMOD32 \
|| (type) == R_ARM_TLS_DTPOFF32 || (type) == R_ARM_TLS_TPOFF32 \
|| (type) == R_ARM_TLS_DESC) \
* ELF_RTYPE_CLASS_PLT) \
| (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
+#else
+#define elf_machine_type_class(type) \
+ ((((type) == R_ARM_JUMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
+ | (((type) == R_ARM_COPY) * ELF_RTYPE_CLASS_COPY))
+#endif
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_ARM_JUMP_SLOT
moveq r0, $EAGAIN /* Yes; translate it to EAGAIN. */
#endif
+#ifndef IS_IN_rtld
mov ip, lr
cfi_register (lr, ip)
mov r1, r0
RETINSTR (, ip)
1: .word errno(gottpoff) + (. - 2b - 8)
+#elif RTLD_PRIVATE_ERRNO
+ ldr r1, 1f
+0: str r0, [pc, r1]
+ mvn r0, $0
+ DO_RET(r14)
+
+1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8
+#else
+#error "Unsupported non-TLS case"
+#endif
#undef __syscall_error
END (__syscall_error)