This is an archive of the discontinued LLVM Phabricator instance.

[ELF] GC: Mark all pieces of non-allocatable mergeable section live.
ClosedPublic

Authored by evgeny777 on Sep 28 2016, 9:21 AM.

Details

Summary

The .comment section may have multiple pieces. Current revision will only live the very first piece alive

Diff Detail

Repository
rL LLVM

Event Timeline

evgeny777 updated this revision to Diff 72848.Sep 28 2016, 9:21 AM
evgeny777 retitled this revision from to [ELF] GC: Mark all pieces of mergeable section live..
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, grimar, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: ikudrin, llvm-commits.
evgeny777 retitled this revision from [ELF] GC: Mark all pieces of mergeable section live. to [ELF] GC: Mark all pieces of non-allocatable mergeable section live..Sep 28 2016, 9:29 AM
rafael accepted this revision.Sep 28 2016, 11:14 AM
rafael edited edge metadata.

LGTM, but please add one more test: Test that linking just

.ident "foobar"

into a shared library results in a .so that has that in .comment.

This revision is now accepted and ready to land.Sep 28 2016, 11:14 AM
ruiu accepted this revision.Sep 28 2016, 12:41 PM
ruiu edited edge metadata.

LGTM

ELF/InputSection.cpp
576 ↗(On Diff #72848)

Add a note as a comment that we do not garbage-collect non-allocatable sections that typically contains debug info.

This revision was automatically updated to reflect the committed changes.