On 7/12/18 12:03 PM, Dimitry Andric wrote:
> Author: dim
> Date: Thu Jul 12 19:02:59 2018
> New Revision: 336227
> URL: https://svnweb.freebsd.org/changeset/base/336227
> Pull in r336008 from upstream clang trunk:
> Request init/fini array on FreeBSD 12 and later
> 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.
> Reviewers: dim, brooks, arichardson
> Reviewed By: dim, brooks, arichardson
> Subscribers: bsdjhb, krytarowski, emaste, cfe-commits
> Differential Revision: https://reviews.llvm.org/D24867
> Requested by: jhb
> MFC after: 3 days
I think that this is a flag day for 12 (and I wanted to get this in sooner
than later so we can test it). I changed the external GCC ports to use
and fini_array earlier this week. I think lang/gcc* still need to be updated to
enable it for 12.x and later.
As long as a single executable or shared library is only using one of
.ctors/.dtors vs init_array/fini_array I believe mixing them in a single process
will be ok as the order of constructors and destructors doesn't change. I think
you can only get into a bind if you mix old and new .o files into a single
executable or shared library (and even then I don't think constructor order
across different object files is really defined anyway, but I'm not sure if LTO
might be affected in some way if you try to mix them).
email@example.com mailing list
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"