File tree Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Expand file tree Collapse file tree 1 file changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -2201,22 +2201,32 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
22012201 as_warn (_ ("repeat < 0; .fill ignored" ));
22022202 size = 0 ;
22032203 }
2204-
2205- if (size && !need_pass_2 )
2204+ else if (size && !need_pass_2 )
22062205 {
2207- if (now_seg == absolute_section )
2206+ if (now_seg == absolute_section && rep_exp . X_op != O_constant )
22082207 {
2209- if (rep_exp .X_op != O_constant )
2210- as_bad (_ ("non-constant fill count for absolute section" ));
2211- else if (fill && rep_exp .X_add_number != 0 )
2212- as_bad (_ ("attempt to fill absolute section with non-zero value" ));
2213- abs_section_offset += rep_exp .X_add_number * size ;
2208+ as_bad (_ ("non-constant fill count for absolute section" ));
2209+ size = 0 ;
2210+ }
2211+ else if (now_seg == absolute_section && fill && rep_exp .X_add_number != 0 )
2212+ {
2213+ as_bad (_ ("attempt to fill absolute section with non-zero value" ));
2214+ size = 0 ;
22142215 }
22152216 else if (fill
22162217 && (rep_exp .X_op != O_constant || rep_exp .X_add_number != 0 )
22172218 && in_bss ())
2218- as_bad (_ ("attempt to fill section `%s' with non-zero value" ),
2219- segment_name (now_seg ));
2219+ {
2220+ as_bad (_ ("attempt to fill section `%s' with non-zero value" ),
2221+ segment_name (now_seg ));
2222+ size = 0 ;
2223+ }
2224+ }
2225+
2226+ if (size && !need_pass_2 )
2227+ {
2228+ if (now_seg == absolute_section )
2229+ abs_section_offset += rep_exp .X_add_number * size ;
22202230
22212231 if (rep_exp .X_op == O_constant )
22222232 {
You can’t perform that action at this time.
0 commit comments