This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch to fix __attribute__ ((aligned)) on arm/elf systems
- To: egcs-patches at egcs dot cygnus dot com
- Subject: patch to fix __attribute__ ((aligned)) on arm/elf systems
- From: Philip Blundell <philb at gnu dot org>
- Date: Sat, 29 May 1999 21:21:14 +0100
This patch corrects a couple of problems with the aligned attribute on ARM
systems using ELF. Could it be applied to both the mainline and the 2.95
branch please?
p.
Sat May 29 19:08:10 1999 Philip Blundell <philb@gnu.org>
* config/arm/aout.h (ASM_OUTPUT_ALIGN): Only define if not already
defined.
* config/arm/elf.h (ASM_OUTPUT_ALIGN): Define.
(MAX_OFILE_ALIGNMENT): Likewise.
Index: elf.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/elf.h,v
retrieving revision 1.8
diff -u -p -r1.8 elf.h
--- elf.h 1999/05/26 01:29:10 1.8
+++ elf.h 1999/05/29 20:17:44
@@ -341,4 +341,14 @@ do { \
/* The ELF assembler handles GOT addressing differently to NetBSD. */
#define GOT_PCREL 0
+/* Biggest alignment supported by the object file format of this
+ machine. Use this macro to limit the alignment which can be
+ specified using the `__attribute__ ((aligned (N)))' construct. If
+ not defined, the default value is `BIGGEST_ALIGNMENT'. */
+#define MAX_OFILE_ALIGNMENT (32768*8)
+
+/* Align output to a power of two. */
+#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
+ fprintf (STREAM, "\t.align\t%d\n", POWER)
+
#include "arm/aout.h"
Index: aout.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/arm/aout.h,v
retrieving revision 1.8
diff -u -p -r1.8 aout.h
--- aout.h 1999/05/07 10:02:38 1.8
+++ aout.h 1999/05/29 20:17:53
@@ -236,6 +236,7 @@ do { char dstr[30]; \
fprintf (STREAM, "\t.space\t%d\n", NBYTES)
/* Align output to a power of two. Horrible /bin/as. */
+#ifndef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
do \
{ \
@@ -246,6 +247,7 @@ do { char dstr[30]; \
else if (amount != 1) \
fprintf (STREAM, "\t.align\t%d\n", amount - 4); \
} while (0)
+#endif
/* Output a common block */
#ifndef ASM_OUTPUT_COMMON