aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/elf.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@cygnus.com>2000-02-18 18:22:10 +0000
committerNick Clifton <nickc@gcc.gnu.org>2000-02-18 18:22:10 +0000
commit725790629f4c9d4efcd88e50f4173b47fd90f869 (patch)
treec26369d1fb9467c96e1407110dd6668104cf2d4d /gcc/config/arm/elf.h
parenta0f4cca64282e20ad9736528dc5d1b20ce4536e0 (diff)
downloadgcc-725790629f4c9d4efcd88e50f4173b47fd90f869.zip
gcc-725790629f4c9d4efcd88e50f4173b47fd90f869.tar.gz
gcc-725790629f4c9d4efcd88e50f4173b47fd90f869.tar.bz2
Prevent emission of "a.lign 0" directives
From-SVN: r32052
Diffstat (limited to 'gcc/config/arm/elf.h')
-rw-r--r--gcc/config/arm/elf.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h
index 71b36d2..9b620206 100644
--- a/gcc/config/arm/elf.h
+++ b/gcc/config/arm/elf.h
@@ -356,8 +356,14 @@ dtors_section () \
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)
+/* Align output to a power of two. Note ".align 0" is redundant,
+ and also GAS will treat it as ".align 2" which we do not want. */
+#define ASM_OUTPUT_ALIGN(STREAM, POWER) \
+ do \
+ { \
+ if ((POWER) > 0) \
+ fprintf (STREAM, "\t.align\t%d\n", POWER); \
+ } \
+ while (0)
#include "arm/aout.h"