Skip to content
Snippets Groups Projects
Commit 2dc2dfa7 authored by Alan Modra's avatar Alan Modra
Browse files

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.
parent f2be4eeb
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,8 @@ frag_new (size_t old_frags_var_max_size ...@@ -166,7 +166,8 @@ frag_new (size_t old_frags_var_max_size
/* Fix up old frag's fr_fix. */ /* Fix up old frag's fr_fix. */
frag_now->fr_fix = frag_now_fix_octets (); 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; frag_now->fr_fix -= old_frags_var_max_size;
/* Make sure its type is valid. */ /* Make sure its type is valid. */
gas_assert (frag_now->fr_type != 0); gas_assert (frag_now->fr_type != 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment