microMIPS is a variable-length encoding of the MIPS32 instruction set
(plus some extra instructions). As it supports almost all of MIPS32,
assembly sources in glibc do not generally need changes to work with
microMIPS, but dl-trampoline.c contains some code with a hardcoded
assumption that three instructions occupy twelve bytes. This patch
fixes this code for microMIPS by using the difference between two
labels to let the assembler calculate the relevant length.
Similar to the problems I fixed for posix_fallocate
<http://sourceware.org/ml/libc-ports/2008-12/msg00007.html> and
fallocate <http://sourceware.org/ml/libc-ports/2009-05/msg00031.html>,
MIPS64 posix_advise also needs fixes to use the correct syscall
interfaces. Although the existing n32 posix_fadvise64 is OK, getting
posix_fadvise from syscalls.list does not work correctly, as this
function is supposed to return an error code instead of storing it in
errno as the generic syscall implementations from syscalls.list do.
In the switch to NPTL the pthrad_mutex_t, pthread_cond_t,
and pthread_rwlock_t structures were made binary compatible
with the Linuxthread versions. However, their aligment when
embedded in other structures was changed. When rebuilding
libstdc++ this was detected, and the following changes return
the structures to their original Linuxthreads alignments.
2009-11-25 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h:
Use correct alignment for pthread_mutex_t, pthread_cond_t,
and pthread_rwlock_t.
Cast oldval to the same type as ret to avoid warnings when
including atomic.h.
2009-11-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/bits/atomic.h: Avoid warnings
by casting oldval to int.
Place socket.h in the correct location.
2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
[BZ #6676]
* sysdeps/unix/sysv/linux/hppa/socket.h: Move from here...
* sysdeps/unix/sysv/linux/hppa/bits/socket.h: ... to here.
The current ELF_MACHINE_LOAD_ADDRESS used by the generic
function pointer code was not safe for use before relocation.
The macro has been rewritten to use only PC relative loads.
2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/dl-fptr.h: Update copyright year.
Reduce ELF_MACHINE_BOOT_FPTR_TABLE_LEN to 64.
Implement ELF_MACHINE_LOAD_ADDRESS using PC relative loads.
Several constants are now defined in a generic file and no longer
need to be defined in the hppa specific file.
2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h:
Remove FUTEX_WAITERS, FUTEX_OWNER_DIED, and FUTEX_TID_MASK.
[BZ #10527] Provide corrected socket constants that match the
kernel values.
2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
Aurelian Jarno <aurelien@aurel32.net>
[BZ #10527]
* sysdeps/unix/sysv/linux/hppa/socket.h: New file.
[BZ #6676] Use PIC relocations in start.S to support the use of -fPIE
on hppa.
2009-11-15 Carlos O'Donell <carlos@codesourcery.com>
[BZ #6676]
* sysdeps/hppa/elf/start.S: Use R_PARISC_DLTIND* relocations
to support -fPIE.
[BZ #10920] Use the new generic override to specify the hppa
specific libgcc_s.so.4 version number. Remove the files which
hppa no longer has to duplicate in order to accomplish
overriding libgcc_s.so version number.
2009-11-08 Carlos O'Donell <carlos@codesourcery.com>
[BZ #10920]
* sysdeps/hppa/libgcc_s.h: New file.
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Remove.
* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Remove.
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.