diff options
author | Jim Wilson <wilson@tuliptree.org> | 2005-11-23 04:34:13 +0000 |
---|---|---|
committer | Jim Wilson <wilson@tuliptree.org> | 2005-11-23 04:34:13 +0000 |
commit | cb3b8d911b227c9ae3ab62ba175688721f86f23e (patch) | |
tree | 9fb349e585a1a89d0044f12dde2a897ca097e619 /gas/config/tc-ia64.c | |
parent | 6abae71cc383ccb6b03d472ebaf9f0d22107c382 (diff) | |
download | gdb-cb3b8d911b227c9ae3ab62ba175688721f86f23e.zip gdb-cb3b8d911b227c9ae3ab62ba175688721f86f23e.tar.gz gdb-cb3b8d911b227c9ae3ab62ba175688721f86f23e.tar.bz2 |
Fix PR 994, core dump with section switching.
* config/tc-ia64.c (slot_index): Emit an error instead of a warning
when the frag chain is broken by section switching.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r-- | gas/config/tc-ia64.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 699a64a..2ac7586 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -2895,24 +2895,11 @@ slot_index (slot_addr, slot_frag, first_addr, first_frag, before_relax) first_addr = (unsigned long) &first_frag->fr_literal; /* This can happen if there is section switching in the middle of a - function, causing the frag chain for the function to be broken. */ + function, causing the frag chain for the function to be broken. + It is too difficult to recover safely from this problem, so we just + exit with an error. */ if (first_frag == NULL) - { - /* We get six warnings for one problem, because of the loop in - fixup_unw_records, and because fixup_unw_records is called 3 - times: once before creating the variant frag, once to estimate - its size, and once to relax it. This is unreasonable, so we use - a static var to make sure we only emit the warning once. */ - static int warned = 0; - - if (!warned) - { - as_warn ("Corrupted unwind info due to unsupported section switching"); - warned = 1; - } - - return index; - } + as_fatal ("Section switching in code is not supported."); } /* Add in the used part of the last frag. */ |