aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-03-29 22:57:57 +0000
committerNick Clifton <nickc@redhat.com>2000-03-29 22:57:57 +0000
commit21d75ec2320e371e332a2c6f17ad8d459b3f650e (patch)
treeeae53e4ba8b8210bf1ea7b12a99eb430e1039699
parentd1a1bf19b462be92990e42621a0b730da81e7c85 (diff)
downloadgdb-21d75ec2320e371e332a2c6f17ad8d459b3f650e.zip
gdb-21d75ec2320e371e332a2c6f17ad8d459b3f650e.tar.gz
gdb-21d75ec2320e371e332a2c6f17ad8d459b3f650e.tar.bz2
Fix SUB_SEGMENT_ALIGN macor for BFD_ASSEMBLER
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-sh.h20
2 files changed, 17 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 065c9b0..869f580 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2000-03-29 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-sh.h (SEG_NAME): New macro: return the name of a
+ segment. Works for both BFD_ASSEMBLER and others.
+ (SUB_SEGMENT_ALIGN): Use SEG_NAME.
+
2000-03-29 Nick Clifton <nickc@cygnus.com
* config/tc-arm.c (tinsns): Add "bal" instruction pattern.
diff --git a/gas/config/tc-sh.h b/gas/config/tc-sh.h
index 099e915..f5ab8a9 100644
--- a/gas/config/tc-sh.h
+++ b/gas/config/tc-sh.h
@@ -130,18 +130,20 @@ extern void sh_coff_reloc_mangle
extern int tc_coff_sizemachdep PARAMS ((fragS *));
#ifdef BFD_ASSEMBLER
-#define SUB_SEGMENT_ALIGN(SEG) 4
+#define SEG_NAME(SEG) segment_name (SEG)
#else
+#define SEG_NAME(SEG) obj_segment_name (SEG)
+#endif
+
/* We align most sections to a 16 byte boundary. */
-#define SUB_SEGMENT_ALIGN(SEG) \
- (strncmp (obj_segment_name (SEG), ".stabstr", 8) == 0 \
- ? 0 \
- : ((strncmp (obj_segment_name (SEG), ".stab", 5) == 0 \
- || strcmp (obj_segment_name (SEG), ".ctors") == 0 \
- || strcmp (obj_segment_name (SEG), ".dtors") == 0) \
- ? 2 \
+#define SUB_SEGMENT_ALIGN(SEG) \
+ (strncmp (SEG_NAME (SEG), ".stabstr", 8) == 0 \
+ ? 0 \
+ : ((strncmp (SEG_NAME (SEG), ".stab", 5) == 0 \
+ || strcmp (SEG_NAME (SEG), ".ctors") == 0 \
+ || strcmp (SEG_NAME (SEG), ".dtors") == 0) \
+ ? 2 \
: (sh_small ? 2 : 4)))
-#endif
#endif /* OBJ_COFF */