aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-m32c.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2005-12-14 02:27:34 +0000
committerDJ Delorie <dj@redhat.com>2005-12-14 02:27:34 +0000
commitbbc434cbc9a182f13eb4cacd9fae9c4b344fc7c2 (patch)
treea4221800493635e2c86fadf189721a7aedfa5e26 /gas/config/tc-m32c.c
parentaceffc0aaaebd646a695f18739f1ffeee0ed2024 (diff)
downloadgdb-bbc434cbc9a182f13eb4cacd9fae9c4b344fc7c2.zip
gdb-bbc434cbc9a182f13eb4cacd9fae9c4b344fc7c2.tar.gz
gdb-bbc434cbc9a182f13eb4cacd9fae9c4b344fc7c2.tar.bz2
* config/tc-m32c.c (m32c_md_end): Only pad code sections.
Diffstat (limited to 'gas/config/tc-m32c.c')
-rw-r--r--gas/config/tc-m32c.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c
index 8dca248..8f4f502 100644
--- a/gas/config/tc-m32c.c
+++ b/gas/config/tc-m32c.c
@@ -31,6 +31,7 @@
#include "libbfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
+#include "bfd.h"
/* Structure to hold all of the different components
describing an individual instruction. */
@@ -180,10 +181,13 @@ m32c_md_end (void)
{
int i, n_nops;
- /* Pad with nops for objdump. */
- n_nops = (32 - ((insn_size) % 32)) / 8;
- for (i = 1; i <= n_nops; i++)
- md_assemble ("nop");
+ if (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE)
+ {
+ /* Pad with nops for objdump. */
+ n_nops = (32 - ((insn_size) % 32)) / 8;
+ for (i = 1; i <= n_nops; i++)
+ md_assemble ("nop");
+ }
}
void