The ELF spec says
Symbols with section index SHN_COMMON may appear only in relocatable objects.
Currently lld can produce file that break that requirement.
LGTM with this change.
checkOptions is a better place to add this code.
Committed version LGTM too.
Was committed as r319473.
checkOptions is a better place to add this code.