This is an archive of the discontinued LLVM Phabricator instance.

Request init/fini array on FreeBSD 12 and later
ClosedPublic

Authored by emaste on Sep 23 2016, 7:58 AM.

Details

Summary

It seems a bad idea to change the default in the middle of a release branch due to possible changes in global ctor / dtor ordering between .ctors and .init_array. With FreeBSD 11.0's release imminent lets change the default now for FreeBSD 12 (the current development stream) and later.

FreeBSD rtld has supported .init_array / .fini_array for many years. As of Jan 1 2017 all supported FreeBSD releases and branches will have support.

Diff Detail

Event Timeline

emaste updated this revision to Diff 72282.Sep 23 2016, 7:58 AM
emaste retitled this revision from to Request init/fini array on FreeBSD 12 and later.
emaste updated this object.
emaste added reviewers: dim, brooks.
emaste added a subscriber: cfe-commits.
dim accepted this revision.Sep 23 2016, 9:36 AM
dim edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Sep 23 2016, 9:36 AM
dim added a comment.May 7 2018, 11:59 AM

Brooks, I can commit this if you prefer. Maybe it can go into 6.0.2 still...

brooks accepted this revision.May 7 2018, 1:16 PM

I do think we should make this change, but don't have a strong opinion on the timing. If we do it for 12 and not 13 then we should probably try to get it into a 6.0.2.

arichardson accepted this revision.May 7 2018, 2:55 PM

I recently made this change for the CHERI clang fork and as far as I can tell everything works fine.

bsdjhb added a subscriber: bsdjhb.Jun 27 2018, 4:23 PM

Ping. I'd like this to go in and get merged into FreeBSD's clang so we can test this for a few months before 12.0 branches.

This revision was automatically updated to reflect the committed changes.