This is PR36515.
Currenly if we have script like .debug_info 0 : { *(.debug_info) },
we would not remove this section and keep it in output.
That does not work, because it is common case for
debug sections to have zero address expression.
Patch changes behavior so that we remove only sections
that do not use symbols in its expressions.
I think I'd personally prefer the test define foo and then checks to make sure that the section is emitted in this case, as that demonstrates the end effect better. We could change the underlying mechanism to detect errors and still remove the section, but then this test doesn't actually test the claimed behaviour.