Ensure that all objects in ARM EABI glibc have the proper EABI build
attributes to indicate that 8-byte stack alignment is required and
preserved. (GNU ld does not currently give errors for mixing code
requiring 8-byte alignment - such as anything built with GCC - and
code not marked as preserving it, because of the prevalence of
assembly code without proper markers to indicate that alignment is
preserved. The ARM RealView linker does give such errors.)
The bulk of the markers are accomplished by the change to sysdep.h,
but a few .S files do not include sysdep.h. In the case of
internal_accept4.S, no code is generated because EABI does not have
socketcall, but for completeness a dummy file with the right
attributes is used to override the default version in libc.
* sysdeps/arm/sysdep.h: (Tag_ABI_align8_preserved,
Tag_ABI_align8_needed): Attributes added.
* sysdeps/arm/elf/start.S: Likewise.
* sysdeps/arm/eabi/abi-note.S: New file.
* sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S: New
file.
* setjmp and longjmp were using the obsolete fstmiax and fldmiax
instructions.
* Because of a confusion with two different sets of names for the same
registers (r0...r3 and a1...a4), if VFP was present then the
subsequent check for iWMMXt support would use a register that had
been clobbered by saving/restoring the VFP registers. (The bit
being checked was clobbered by a reserved bit of FPSCR that it
always 0 on present hardware, and no present hardware has both VFP
and iWMMXt, so this did not cause visible problems.)
2009-10-22 Andrew Stubbs <ams@codesourcery.com>
Julian Brown <julian@codesourcery.com>
* sysdeps/arm/eabi/setjmp.S (__sigsetjmp): Replace deprecated
instruction fstmiax with vstmia.
Correct register conflict and comment.
* sysdeps/arm/eabi/__longjmp.S (__longjmp): Use vldmia not fldmiax.
Don't clobber r1/a2 register before testing IWMMXT hwcap.
This version of the NPTL POSIX thread ABI for hppa does
not break backwards compatibility with the the old
Linuxthreads ABI, and is therefore suitable for release
by distributions.
sysdeps/unix/sysv/linux/hppa/
* internaltypes.h: New file.
sysdeps/unix/sysv/linux/hppa/nptl/
* pthreadP.h: New file.
* pthread.h: New file.
* pthread_cond_broadcast.c: New file.
* pthread_cond_destroy.c: New file.
* pthread_cond_init.c: New file.
* pthread_cond_signal.c: New file.
* pthread_cond_timedwait.c: New file.
* pthread_cond_wait.c: New file.
* bits/pthreadtypes.h: Make pthread_mutex_t,
pthread_rwlock_t, and pthread_cond_t backwards
compatible.
* sysdeps/mips/____longjmp_chk.c: Remove. Replaced by....
* sysdeps/unix/sysv/linux/mips/____longjmp_chk.c: This. New file.
* sysdeps/mips/__longjmp.c (__longjmp): Use explicit register
variable for env. Use expansion of CHECK_SP macro for check.
* sysdeps/mips/mips64/__longjmp.c (__Longjmp): Likewise.
sysdeps/unix/sysv/linux/internal_accept4.S expects socket.S to be
present if __NR_socketcall is defined (which it is on MIPS o32, even
though there are separate syscalls as well) and __NR_accept4 isn't.
MIPS does not have socket.S, since it uses separate syscalls, but
though the accept4 syscall should be added soon present kernel headers
do not have it. This patch creates a dummy internal_accept4.S for
MIPS o32, and an accept4.c wrapper that undefines __NR_socketcall so
that the main accept4.c falls back to the ENOSYS implementation if
__NR_accept4 isn't defined; it doesn't seem worthwhile to have a
special socketcall-based assembly implementation just for o32 on a few
kernels in the range between accept4 being available via socketcall
and the accept4 syscall being available.
* sysdeps/arm/eabi/aeabi_lcsts.c (__aeabi_stdin, __aeabi_stdout,
__aeabi_stderr): New variables.
(setup_aeabi_stdio): New function. Add it to .preinit_array.
* sysdeps/mips/____longjmp_chk.c: New file.
* sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't
undefine __longjmp.
* sysdeps/mips64/__longjmp.c: Likewise.