I found that during visual inspection of code while wrote different patch.
Script in testcase probably have nothing common with real life, but
we segfault currently using it.
I think if output section is known NOBITS, there is no need to create
writers threads for doing nothing or proccess any filler logic that is useless here.
We can just early return, that is what this patch do.
Why don't you write this at the very beginning of this function?