mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
PR gas/12931
* config/tc-arm.c (mapping_state): When changing to ARM or THUMB state set the minimum required alignment of the section.
This commit is contained in:
parent
6f5def7d9e
commit
49c62a3353
@ -1,3 +1,9 @@
|
||||
2011-06-29 Dave Martin <dave.martin@linaro.org>
|
||||
|
||||
PR gas/12931
|
||||
* config/tc-arm.c (mapping_state): When changing to ARM or THUMB
|
||||
state set the minimum required alignment of the section.
|
||||
|
||||
2011-06-29 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/tc-i386.c (i386_mach): Convert to ISO-C.
|
||||
|
@ -2589,7 +2589,24 @@ mapping_state (enum mstate state)
|
||||
/* The mapping symbol has already been emitted.
|
||||
There is nothing else to do. */
|
||||
return;
|
||||
else if (TRANSITION (MAP_UNDEFINED, MAP_DATA))
|
||||
|
||||
if (state == MAP_ARM || state == MAP_THUMB)
|
||||
/* PR gas/12931
|
||||
All ARM instructions require 4-byte alignment.
|
||||
(Almost) all Thumb instructions require 2-byte alignment.
|
||||
|
||||
When emitting instructions into any section, mark the section
|
||||
appropriately.
|
||||
|
||||
Some Thumb instructions are alignment-sensitive modulo 4 bytes,
|
||||
but themselves require 2-byte alignment; this applies to some
|
||||
PC- relative forms. However, these cases will invovle implicit
|
||||
literal pool generation or an explicit .align >=2, both of
|
||||
which will cause the section to me marked with sufficient
|
||||
alignment. Thus, we don't handle those cases here. */
|
||||
record_alignment (now_seg, state == MAP_ARM ? 2 : 1);
|
||||
|
||||
if (TRANSITION (MAP_UNDEFINED, MAP_DATA))
|
||||
/* This case will be evaluated later in the next else. */
|
||||
return;
|
||||
else if (TRANSITION (MAP_UNDEFINED, MAP_ARM)
|
||||
|
Loading…
Reference in New Issue
Block a user