aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-xtensa.c
diff options
context:
space:
mode:
authorSterling Augustine <saugustine@google.com>2009-02-24 22:51:10 +0000
committerSterling Augustine <saugustine@google.com>2009-02-24 22:51:10 +0000
commit658ff9936ca9681c539b1ad52a45744222b9bf0a (patch)
tree6c09d280510895482a75b1ea9d577812c491f7cb /bfd/elf32-xtensa.c
parentcf3eccff18d451bf1a9454e72068f97d7467e5ff (diff)
downloadgdb-658ff9936ca9681c539b1ad52a45744222b9bf0a.zip
gdb-658ff9936ca9681c539b1ad52a45744222b9bf0a.tar.gz
gdb-658ff9936ca9681c539b1ad52a45744222b9bf0a.tar.bz2
2009-02-24 Sterling Augustine <sterling@tensilica.com>
* elf32-xtensa.c (text_action_add): Separate test for action type. Break if saved action is ta_widen_insn at same offset.
Diffstat (limited to 'bfd/elf32-xtensa.c')
-rw-r--r--bfd/elf32-xtensa.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index dadf42b..856d8a9 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -5478,12 +5478,20 @@ text_action_add (text_action_list *l,
for (m_p = &l->head; *m_p && (*m_p)->offset <= offset; m_p = &(*m_p)->next)
{
text_action *t = *m_p;
- /* When the action is another fill at the same address,
- just increase the size. */
- if (t->offset == offset && t->action == ta_fill && action == ta_fill)
+
+ if (action == ta_fill)
{
- t->removed_bytes += removed;
- return;
+ /* When the action is another fill at the same address,
+ just increase the size. */
+ if (t->offset == offset && t->action == ta_fill)
+ {
+ t->removed_bytes += removed;
+ return;
+ }
+ /* Fills need to happen before widens so that we don't
+ insert fill bytes into the instruction stream. */
+ if (t->offset == offset && t->action == ta_widen_insn)
+ break;
}
}