ruiu added a comment. In general, I think we pass through all input sections to an output when the -r option is given. But in this patch you deduplicates comdat groups. Do you need that? https://reviews.llvm.org/D33485