diff options
author | DJ Delorie <dj@delorie.com> | 2005-12-14 02:27:34 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2005-12-14 02:27:34 +0000 |
commit | 212e5f4b382112ecdfe9e9095cc5125a22b8badb (patch) | |
tree | f4f201f3ab16e454e91bfefcd57197f75ff22190 | |
parent | 85c58dca99d9afddce47d2bbf1a28718b0d40be9 (diff) | |
download | binutils-redhat-212e5f4b382112ecdfe9e9095cc5125a22b8badb.tar.gz |
* config/tc-m32c.c (m32c_md_end): Only pad code sections.
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-m32c.c | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 6f310eaa4e..3f2897af6d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2005-12-13 DJ Delorie <dj@redhat.com> + + * config/tc-m32c.c (m32c_md_end): Only pad code sections. + 2005-12-12 Paul Brook <paul@codesourcery.com> * config/tc-arm.c (do_branch): Generate EABI branch relocations. diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c index 8dca2480d4..8f4f50225e 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 |