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.
Joseph Myers <joseph@codesourcery.com>
* sysdeps/arm/dl-machine.h (elf_machine_dynamic): Ditto.
(elf_machine_load_address): Clear T bit of PLT entry contents.
(RTLD_START): Mark function symbols as such. Tweak pc-relative
addressing to avoid depending on pc read pipeline offset.
* sysdeps/arm/machine-gmon.h (MCOUNT): Add Thumb-2 implementation.
* sysdeps/arm/tls-macros.h: Add alignment for Thumb-2.
(ARM_PC_OFFSET): Define.
(TLS_IE): Define differently for Thumb-2.
(TLS_LE, TLS_LD, TLS_GD): Use ARM_PC_OFFSET.
* sysdeps/arm/elf/start.S: Switch to thumb mode for Thumb-2.
* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (INTERNAL_SYSCALL_RAW):
Add Thumb implementation.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/aio_misc.h: New.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c: Enforce
alignment for Thumb-2. Adjust offset from PC for Thumb-2.
* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c: Ditto.
* sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (atomic_full_barrier,
__arch_compare_and_exchange_val_32_acq): Add Thumb-2 implementation.