This is an archive of the discontinued LLVM Phabricator instance.

[profile] Add test for dead_strip+live_support functionality
ClosedPublic

Authored by vsk on Oct 10 2016, 5:32 PM.

Details

Summary

On Darwin, marking a section as "regular,live_support" means that a
symbol in the section should only be kept live if it has a reference to
something that is live. Otherwise, the linker is free to dead-strip it.

Add a test for dead_strip+live_support functionality for profile data.

Depends on D25456.

Diff Detail

Event Timeline

vsk updated this revision to Diff 74192.Oct 10 2016, 5:32 PM
vsk retitled this revision from to [profile] Add test for dead_strip+live_support functionality.
vsk updated this object.
vsk added reviewers: davidxl, mehdi_amini.
vsk added a subscriber: llvm-commits.
mehdi_amini added inline comments.Oct 10 2016, 7:59 PM
test/profile/instrprof-darwin-dead-strip.c
5

I've never looked at compiler-rt tests. We usually build and run these?

davidxl added inline comments.Oct 10 2016, 8:11 PM
test/profile/instrprof-darwin-dead-strip.c
5

compiler-rt tests are usually end-end tests with run step

davidxl added inline comments.Oct 10 2016, 8:19 PM
test/profile/instrprof-darwin-dead-strip.c
22

Also check other related sections are dead-stripped?

vsk updated this revision to Diff 74279.Oct 11 2016, 11:42 AM
  • Make the test more thorough per @davidxl's comment.
davidxl accepted this revision.Oct 11 2016, 1:39 PM
davidxl edited edge metadata.

lgtm

This revision is now accepted and ready to land.Oct 11 2016, 1:39 PM
This revision was automatically updated to reflect the committed changes.