This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Simplify logic of creating "COMMON" section.
ClosedPublic

Authored by grimar on Mar 7 2017, 3:46 AM.

Diff Detail

Event Timeline

grimar created this revision.Mar 7 2017, 3:46 AM
ruiu edited edge metadata.Mar 7 2017, 9:13 AM

Overall looking good. Nice improvement. A minor comments.

ELF/Relocations.cpp
482 ↗(On Diff #90830)

RelSec -> Bss, as In<ELFT>::Bss is not a .rel.

ELF/SyntheticSections.cpp
373–374

Do this at the beginning of this function because it doesn't depend on this->Size or this->Alignment you already computed.

ELF/SyntheticSections.h
156–157

.bss for read-write copy relocations, .bss.rel.ro for read-only copy relocations, and COMMON for common symbols.

167–169

Size = 0

grimar updated this revision to Diff 91891.Mar 15 2017, 9:28 AM
  • Rebased, addressed comments.
ruiu accepted this revision.Mar 15 2017, 9:38 AM

LGTM

ELF/SyntheticSections.h
162

Add explicit.

This revision is now accepted and ready to land.Mar 15 2017, 9:38 AM
This revision was automatically updated to reflect the committed changes.