]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add ARM EABI build attributes.
authorDaniel Gutson <dgutson@codesourcery.com>
Thu, 22 Oct 2009 19:39:47 +0000 (19:39 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 22 Oct 2009 19:39:47 +0000 (19:39 +0000)
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.

ChangeLog.arm
sysdeps/arm/eabi/abi-note.S [new file with mode: 0644]
sysdeps/arm/elf/start.S
sysdeps/arm/sysdep.h
sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S [new file with mode: 0644]

index f098f3c9a623a6ae3bdb3ed86f1775cf237482d8..170d51a4dc8b39c2986af70f6717aa3d257a1b4d 100644 (file)
@@ -1,3 +1,12 @@
+2009-10-22  Daniel Gutson  <dgutson@codesourcery.com>
+
+       * 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.
+
 2009-10-22  Andrew Stubbs  <ams@codesourcery.com>
             Julian Brown  <julian@codesourcery.com>
 
diff --git a/sysdeps/arm/eabi/abi-note.S b/sysdeps/arm/eabi/abi-note.S
new file mode 100644 (file)
index 0000000..1060c3d
--- /dev/null
@@ -0,0 +1,9 @@
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+       .eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+       .eabi_attribute 24, 1
+
+#include <csu/abi-note.S>
+
index d21102ea5859ea4d7d791266ca831f45b804295c..c69f19d3bc75e13d2e31d443b3a745554b22964b 100644 (file)
                ...
                                        NULL
 */
+
+#if defined(__ARM_EABI__)
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+       .eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+       .eabi_attribute 24, 1
+#endif
+
 #if defined(__thumb2__)
        .thumb
        .syntax unified
index 8ca77a60cbea921a03b077a3af115a6abcf2af99..442d3a146ec4d685d2b89ebac5c97d0010cee9df 100644 (file)
 #define mcount         _mcount
 #endif
 
+#if defined(__ARM_EABI__)
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+       .eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+       .eabi_attribute 24, 1
+#endif
+
 #endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S b/sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S
new file mode 100644 (file)
index 0000000..eeb5f50
--- /dev/null
@@ -0,0 +1,6 @@
+/* Tag_ABI_align8_preserved: This code preserves 8-byte
+   alignment in any callee.  */
+       .eabi_attribute 25, 1
+/* Tag_ABI_align8_needed: This code may require 8-byte alignment from
+   the caller.  */
+       .eabi_attribute 24, 1