This is an archive of the discontinued LLVM Phabricator instance.

[ELF] mergeSections: remove non-alive MergeInputSection
ClosedPublic

Authored by MaskRay on Aug 14 2018, 4:01 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

MaskRay created this revision.Aug 14 2018, 4:01 PM
MaskRay updated this revision to Diff 160720.Aug 14 2018, 4:43 PM

Update description with arc diff --edit --verbatim (see if this updates the Phabricator summary)

Cool! Can you add a test?

MaskRay added a comment.EditedAug 15 2018, 10:19 AM

I don't know how to add a test checking the elements of InputSections.

Alternatively, I can check whether getErrorPlace will cause cast<> assertion failure. But how can I make it error?

MaskRay updated this revision to Diff 160856.Aug 15 2018, 11:03 AM

.rodata.str2.1 -> .rodata.str1.2

MaskRay updated this revision to Diff 160858.Aug 15 2018, 11:07 AM

Simplify test

grimar accepted this revision.Aug 16 2018, 2:20 AM

LGTM with a nit.

test/ELF/x86-64-reloc-error2.s
13 ↗(On Diff #160859)

You do not need to reveal the implementation details in the test cases.
They might change and will make such comment outdated.

All you need is to say is something like:
"This mergeable section will be garbage collected. We had a crash issue in that case. Test it."

This revision is now accepted and ready to land.Aug 16 2018, 2:20 AM
MaskRay marked an inline comment as done.Aug 16 2018, 10:22 AM
This revision was automatically updated to reflect the committed changes.