diff options
author | Jim Wilson <wilson@tuliptree.org> | 2001-01-15 23:30:38 +0000 |
---|---|---|
committer | Jim Wilson <wilson@tuliptree.org> | 2001-01-15 23:30:38 +0000 |
commit | b44b1b85f3bf4d213f9735a542bf0ba107b9a00b (patch) | |
tree | 7c855131137fb6baee890a0074f8014bc559e0e4 | |
parent | 428e1889bc97f711eacc344ee3e17a8bfc05176d (diff) | |
download | gdb-b44b1b85f3bf4d213f9735a542bf0ba107b9a00b.zip gdb-b44b1b85f3bf4d213f9735a542bf0ba107b9a00b.tar.gz gdb-b44b1b85f3bf4d213f9735a542bf0ba107b9a00b.tar.bz2 |
Fix assembler segfault on gcc/crtstuff.c file.
* config/tc-ia64.c (ia64_flush_insns): Handle unwind directives
not immediately followed by an instruction.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-ia64.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 08310c3..4703f25 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-01-15 Jim Wilson <wilson@redhat.com> + + * config/tc-ia64.c (ia64_flush_insns): Handle unwind directives + not immediately followed by an instruction. + 2001-01-15 Kazu Hirata <kazu@hxi.com> * config/tc-m68hc11.c: Fix formatting. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index b0ff7ed..4f761e2 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -909,6 +909,7 @@ ia64_flush_insns () struct label_fix *lfix; segT saved_seg; subsegT saved_subseg; + unw_rec_list *ptr; if (!md.last_text_seg) return; @@ -936,6 +937,22 @@ ia64_flush_insns () } CURR_SLOT.tag_fixups = 0; + /* In case there are unwind directives following the last instruction, + resolve those now. We only handle body and prologue directives here. + Give an error for others. */ + for (ptr = unwind.current_entry; ptr; ptr = ptr->next) + { + if (ptr->r.type == prologue || ptr->r.type == prologue_gr + || ptr->r.type == body) + { + ptr->slot_number = (unsigned long) frag_more (0); + ptr->slot_frag = frag_now; + } + else + as_bad (_("Unwind directive not followed by an instruction.")); + } + unwind.current_entry = NULL; + subseg_set (saved_seg, saved_subseg); if (md.qp.X_op == O_register) |