HomePhabricator

Currently lld creates a single section to collect all commons. There is no way

Description

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) }}

This patch changes the allocation of commons to create a section per common
symbol and let the section logic do the layout.

Differential revision: https://reviews.llvm.org/D37489

Details

Committed
dmikulinSep 8 2017, 9:22 AM
Differential Revision
D37489: Linker script handing of file patterns with COMMON defs
Parents
rL312795: Add '\n' in ClangDataCollectorsEmitter
Branches
Unknown
Tags
Unknown