diff options
author | Alan Modra <amodra@gmail.com> | 2023-03-09 16:35:12 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-03-09 22:47:51 +1030 |
commit | 2dc2dfa7d7a53aae58da4a51a77e9ad996cd2937 (patch) | |
tree | 093a8bc7b4beb6db8d41384895342c49bd08e220 /gas | |
parent | f2be4eeb6ce93e4dfab259587bcaf5cb861fc25b (diff) | |
download | binutils-2dc2dfa7d7a53aae58da4a51a77e9ad996cd2937.zip binutils-2dc2dfa7d7a53aae58da4a51a77e9ad996cd2937.tar.gz binutils-2dc2dfa7d7a53aae58da4a51a77e9ad996cd2937.tar.bz2 |
gas: allow frag address wrapping in absolute section
This:
.struct -1
x:
.fill 1
y:
results in an internal error in frag_new due to abs_section_offset
wrapping from -1 to 0. Frags in the absolute section don't do much so
I think we can allow the address wrap.
* frags.c (frag_new): Allow address wrap in absolute section.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/frags.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/frags.c b/gas/frags.c index 2a2806d..016d857 100644 --- a/gas/frags.c +++ b/gas/frags.c @@ -166,7 +166,8 @@ frag_new (size_t old_frags_var_max_size /* Fix up old frag's fr_fix. */ frag_now->fr_fix = frag_now_fix_octets (); - gas_assert (frag_now->fr_fix >= old_frags_var_max_size); + gas_assert (frag_now->fr_fix >= old_frags_var_max_size + || now_seg == absolute_section); frag_now->fr_fix -= old_frags_var_max_size; /* Make sure its type is valid. */ gas_assert (frag_now->fr_type != 0); |