https://sourceware.org/bugzilla/show_bug.cgi?id=33265
--- Comment #6 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4e46c5a14f39342897cfcb7ecb9c0270f30247f4 commit 4e46c5a14f39342897cfcb7ecb9c0270f30247f4 Author: H.J. Lu <hjl.to...@gmail.com> Date: Fri Aug 15 06:18:30 2025 -0700 ld: Issue an error if group nested too deeply If a linker script has a group nested too deeply by mistake, issue an error instead of hanging forever without outputting any error message. PR ld/33265 * ldlang.c (MAX_NESTED_GROUP_DEPTH): New. (open_input_bfds): Add a pointer argument for the nested group count. Increment the count before the while loop and decrement it after the loop. Issue an error if the nested group count >= MAX_NESTED_GROUP_DEPTH when processing input statement. (lang_process): Update open_input_bfds calls. (cmdline_emit_object_only_section): Likewise. * testsuite/ld-scripts/libpr33265-1.a: New file. * testsuite/ld-scripts/libpr33265-2.a: Likewise. * testsuite/ld-scripts/libpr33265-3a.a: Likewise. * testsuite/ld-scripts/libpr33265-3b.a: Likewise. * testsuite/ld-scripts/libpr33265-3c.a: Likewise. * testsuite/ld-scripts/pr33265-1.d: Likewise. * testsuite/ld-scripts/pr33265-2.d: Likewise. * testsuite/ld-scripts/pr33265-3.d: Likewise. * testsuite/ld-scripts/script.exp: Run PR ld/33265 tests. Signed-off-by: H.J. Lu <hjl.to...@gmail.com> -- You are receiving this mail because: You are on the CC list for the bug.