ruiu added a comment. I doubt if the benefit of this patch exceeds the increased complexity. Isn't this a corner case where no one can really say this is a bug? Can't you simply fix your linker script instead of lld? https://reviews.llvm.org/D48924