This is an archive of the discontinued LLVM Phabricator instance.

Clear output section from linker script command when it's removed.
Needs ReviewPublic

Authored by dmikulin on May 12 2017, 12:04 PM.
This revision needs review, but all specified reviewers are disabled or inactive.

Details

Reviewers
espindola
Summary

This is an attempt to fix https://bugs.llvm.org/show_bug.cgi?id=33029.
When output sections are removed, the need to be purged from linker script commands that define them.

Diff Detail

Event Timeline

dmikulin created this revision.May 12 2017, 12:04 PM
dmikulin updated this revision to Diff 99071.EditedMay 15 2017, 3:48 PM

Updated diff to address comments from the review and the online discussion.

ruiu added a subscriber: ruiu.May 16 2017, 10:38 AM
ruiu added inline comments.
ELF/LinkerScript.cpp
703 ↗(On Diff #99071)

What is the meaning of this change?

dmikulin added inline comments.May 16 2017, 11:26 AM
ELF/LinkerScript.cpp
703 ↗(On Diff #99071)

Rafael suggested that we should not be tracking section types of previous sections and always use PROGBITS for dummy sections.

dmikulin updated this revision to Diff 99989.May 23 2017, 2:13 PM

Removed Writer.cpp changes.