[PATCH v3] ld: Issue an error if group nested too deeply
Jan Beulich
jbeulich@suse.com
Fri Aug 15 09:40:09 GMT 2025
On 15.08.2025 06:07, H.J. Lu wrote:
> @@ -3673,8 +3680,10 @@ open_input_bfds (lang_statement_union_type *s,
> plugin_insert_save = plugin_insert;
> #endif
> undefs = link_info.hash->undefs_tail;
> + (*nested_group_count_p)++;
Personally I consider such (slightly) harder to read, compared to
++*nested_group_count_p;
> open_input_bfds (s->group_statement.children.head, os,
> - mode | OPEN_BFD_FORCE);
> + mode | OPEN_BFD_FORCE,
> + nested_group_count_p);
> }
> while (undefs != link_info.hash->undefs_tail
> #if BFD_SUPPORTS_PLUGINS
> @@ -3684,6 +3693,7 @@ open_input_bfds (lang_statement_union_type *s,
> || (plugin_insert != plugin_insert_save && plugin_undefs)
> #endif
> );
> + *nested_group_count_p = 0;
Didn't you mean this to be a decrement now? Otherwise I don't see how this
addresses my earlier concern.
Jan
More information about the Binutils
mailing list