summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-11-02 13:46:13 +0000
committerNick Clifton <nickc@redhat.com>2015-11-02 13:46:13 +0000
commita62e59897771e2f04fad908fc891714b9bd75d7b (patch)
treeee7c689bd6a1e6dc29d0003eb10a2e9bc6525dee
parent1e52a0735533acf8b50494bf4274f4d4c4e7683f (diff)
downloadbinutils-gdb-a62e59897771e2f04fad908fc891714b9bd75d7b.tar.gz
Fix the RX assembler's section alignment parameter to use multiples of N rather than powers of N
* config/tc-rx.c (parse_rx_section): Align parameter provides a multiple of n argument, not a power of n argument.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-rx.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index af1540cf3ec..0ef70adbc5a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-02 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-rx.c (parse_rx_section): Align parameter provides a
+ multiple of n argument, not a power of n argument.
+
2015-10-29 Nick Clifton <nickc@redhat.com>
* config/tc-aarch64.c (elf64_aarch64_target_format): Select the
diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index 4345d58e586..8e99fa3ec7c 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -400,7 +400,7 @@ parse_rx_section (char * name)
asection * sec;
int type;
int attr = SHF_ALLOC | SHF_EXECINSTR;
- int align = 2;
+ int align = 1;
char end_char;
do
@@ -428,9 +428,9 @@ parse_rx_section (char * name)
p++;
switch (*p)
{
- case '2': align = 2; break;
- case '4': align = 4; break;
- case '8': align = 8; break;
+ case '2': align = 1; break;
+ case '4': align = 2; break;
+ case '8': align = 3; break;
default:
as_bad (_("unrecognised alignment value in .SECTION directive: %s"), p);
ignore_rest_of_line ();