This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Prevent arm-elf gcc from emiting ".align 0" directives
- To: gcc-patches at gcc dot gnu dot org
- Subject: Prevent arm-elf gcc from emiting ".align 0" directives
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Wed, 16 Feb 2000 18:04:44 -0800
Hi Guys,
Unless there are any objections I am about to apply this patch to
prevent the arm-elf and thumb-elf targeted versions of gcc froming
emitting ".align 0" directives when trying to emit byte aligned data
items. This is because the ARM assemblers treat ".align 0" as
indicating word alignment, nit byte alignment.
Cheers
Nick
2000-02-16 Nick Clifton <nickc@cygnus.com>
* config/arm/elf.h (ASM_OUTPUT_ALIGN): Do not generate
anything for an alignment of zero.
* config/arm/thumb.h (ASM_OUTPUT_ALIGN): Do not generate
anything for an alignment of zero.
Index: elf.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/arm/elf.h,v
retrieving revision 1.28
diff -p -r1.28 elf.h
*** elf.h 1999/11/05 09:34:49 1.28
--- elf.h 2000/02/17 01:53:06
*************** dtors_section () \
*** 358,364 ****
#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"
--- 358,369 ----
#define MAX_OFILE_ALIGNMENT (32768 * 8)
/* Align output to a power of two. */
! #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
! do \
! { \
! if ((POWER) > 0) \
! fprintf (STREAM, "\t.align\t%d\n", POWER); \
! } \
! while (0)
#include "arm/aout.h"
Index: thumb.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/arm/thumb.h,v
retrieving revision 1.32
diff -p -r1.32 thumb.h
*** thumb.h 2000/02/11 14:57:01 1.32
--- thumb.h 2000/02/17 01:53:06
*************** extern int target_flags;
*** 142,151 ****
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
! #define ASM_OUTPUT_ALIGN(STREAM,LOG) \
! { \
! fprintf (STREAM, "\t.align\t%d\n", (LOG)); \
! }
/* Output a common block */
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
--- 142,154 ----
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
! #define ASM_OUTPUT_ALIGN(STREAM,LOG) \
! do \
! { \
! if ((LOG) > 0) \
! fprintf (STREAM, "\t.align\t%d\n", LOG); \
! } \
! while (0)
/* Output a common block */
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \