aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-05-06 16:19:04 +0000
committerIan Lance Taylor <ian@airs.com>1997-05-06 16:19:04 +0000
commit91951af61f96399405771bd886cb2aba5ba1a3cb (patch)
tree40a7798bfa41e1f02f36a2cb425cb19825be92fc
parentaba5cc8b9d515bc973d9fdaebf02efbb03a6e99a (diff)
downloadgdb-91951af61f96399405771bd886cb2aba5ba1a3cb.zip
gdb-91951af61f96399405771bd886cb2aba5ba1a3cb.tar.gz
gdb-91951af61f96399405771bd886cb2aba5ba1a3cb.tar.bz2
* config/tc-i386.c (md_section_align): If a.out and BFD, force
section size to be aligned.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c16
2 files changed, 20 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 889e391..38add04 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 6 12:18:09 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/tc-i386.c (md_section_align): If a.out and BFD, force
+ section size to be aligned.
+
Mon May 5 17:16:55 1997 Ian Lance Taylor <ian@cygnus.com>
* cond.c: Include "macro.h".
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 4a20a7e..1b4424d 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2981,7 +2981,21 @@ md_section_align (segment, size)
segT segment;
valueT size;
{
- return size; /* Byte alignment is fine */
+#ifdef OBJ_AOUT
+#ifdef BFD_ASSEMBLER
+ /* For a.out, force the section size to be aligned. If we don't do
+ this, BFD will align it for us, but it will not write out the
+ final bytes of the section. This may be a bug in BFD, but it is
+ easier to fix it here since that is how the other a.out targets
+ work. */
+ int align;
+
+ align = bfd_get_section_alignment (stdoutput, segment);
+ size = ((size + (1 << align) - 1) & ((valueT) -1 << align));
+#endif
+#endif
+
+ return size;
}
/* Exactly what point is a PC-relative offset relative TO? On the