testsuite, darwin: Handle Darwin LTO section names.

This recognises the .section __GNU_LTO, segment prefix used by Darwin
to skip LTO sections there and splits this into a separate function
since it is used several times.

	PR testsuite/112728

gcc/testsuite/ChangeLog:

	* lib/scanasm.exp (remove_lto_sections): New.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
(cherry picked from commit 0266ef2156f481c0d8aac119d0dffe99fb9bf7c1)
1 file changed