Currently lld creates a single section to collect all commons. There is no way to separate commons based on file name patterns. The following linker script construct does not work because commons are allocated before section placement is done and the only synthesized BssSection that holds all commons has no file associated with it:
SECTIONS { .common_0 : { *file0.o(COMMON) }}
The idea here is to create a common section for each set of commons matching a COMMON file pattern in the linker script. Each section will have a file name of one of the member symbols attached to it so that subsequent processing of SECTION commands can match against it and place it into an appropriate output section.