diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-03-01 06:10:58 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-03-01 06:10:58 +0000 |
commit | a941619c0b0c871c0bf64844d4bc058ddc158e3f (patch) | |
tree | b1b6133f4c6f5c56a5742c3abdc525a0da662755 | |
parent | 847e232af6adf4d21eb51ee396f914de1395da7e (diff) | |
download | gdb-a941619c0b0c871c0bf64844d4bc058ddc158e3f.zip gdb-a941619c0b0c871c0bf64844d4bc058ddc158e3f.tar.gz gdb-a941619c0b0c871c0bf64844d4bc058ddc158e3f.tar.bz2 |
* config/tc-mips.c (mips16_extended_frag): Don't assume that we
can rely on the frag address to determine whether a frag is
earlier or later.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 17 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index adcd663..90cde16 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Sat Mar 1 01:04:04 1997 Ian Lance Taylor <ian@cygnus.com> + + * config/tc-mips.c (mips16_extended_frag): Don't assume that we + can rely on the frag address to determine whether a frag is + earlier or later. + Fri Feb 28 14:40:00 1997 Ian Lance Taylor <ian@cygnus.com> * write.h (LOCAL_LABEL): Only define if not BFD_ASSEMBLER. diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 31b5d1f..5290f3b 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -9787,12 +9787,16 @@ mips16_extended_frag (fragp, sec, stretch) { fragS *f; - /* Adjust stretch for any alignment frag. FIXME: This - doesn't handle the fr_subtype field, which specifies a - maximum number of bytes to skip when doing an alignment. */ - for (f = fragp; f != fragp->fr_symbol->sy_frag; f = f->fr_next) + /* Adjust stretch for any alignment frag. Note that if have + been expanding the earlier code, the symbol may be + defined in what appears to be an earlier frag. FIXME: + This doesn't handle the fr_subtype field, which specifies + a maximum number of bytes to skip when doing an + alignment. */ + for (f = fragp; + f != NULL && f != fragp->fr_symbol->sy_frag; + f = f->fr_next) { - assert (f != NULL); if (f->fr_type == rs_align || f->fr_type == rs_align_code) { if (stretch < 0) @@ -9804,7 +9808,8 @@ mips16_extended_frag (fragp, sec, stretch) break; } } - val += stretch; + if (f != NULL) + val += stretch; } addr = fragp->fr_address + fragp->fr_fix; |