Files
binutils-gdb/ld/testsuite/ld-scripts
H.J. Lu 4e46c5a14f 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.tools@gmail.com>
2025-08-18 05:13:57 -07:00
..
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2023-02-17 15:19:47 +10:30
2023-02-14 10:13:28 +00:00
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2016-05-19 14:07:06 +09:30
2016-05-19 14:07:06 +09:30
2016-05-19 14:07:06 +09:30
2016-05-19 14:07:06 +09:30
2016-05-19 14:07:06 +09:30
2016-05-19 14:07:06 +09:30
2020-12-24 22:58:03 +10:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2018-09-17 23:17:14 +09:30
2019-09-11 13:45:18 +09:30
2023-01-02 14:03:22 +10:30
2023-01-02 14:03:22 +10:30
2023-08-16 14:22:54 +01:00
2020-07-07 18:26:34 +09:30
2020-08-25 19:31:57 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2020-07-07 18:26:34 +09:30
2019-02-06 17:33:54 +10:30
2019-01-29 06:07:42 -08:00
2019-01-29 06:07:42 -08:00
2019-01-29 06:07:42 -08:00
2020-08-25 19:31:57 +09:30
2020-07-07 18:26:34 +09:30
2020-08-25 19:31:57 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-08-25 19:31:57 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-13 22:03:59 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2023-08-02 12:06:23 +01:00
2025-07-21 06:18:54 -07:00
2016-05-09 17:07:33 +09:30
2021-01-06 21:03:55 +10:30
2023-01-31 15:18:04 +10:30
2020-07-07 18:26:34 +09:30
2020-07-07 18:26:34 +09:30
2023-01-02 14:03:22 +10:30
2020-07-07 18:26:34 +09:30
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2022-11-28 16:30:18 +01:00
2022-11-28 16:30:18 +01:00
2023-08-02 12:06:23 +01:00
2023-08-02 12:06:23 +01:00
2024-02-28 16:36:37 +00:00
2024-02-28 16:36:37 +00:00
2024-02-28 16:36:37 +00:00