[Darwin] Suppress emitting empty ctor/dtor sections.
authorIain Sandoe <iains@gcc.gnu.org>
Sat, 12 Oct 2019 19:20:43 +0000 (19:20 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sat, 12 Oct 2019 19:20:43 +0000 (19:20 +0000)
commit8103659e35edffe864ad49ac4be3a40dae0785a0
tree6695dec5074aa7901b830e506f8466b72ed7552b
parentf8d234a38d9a58ac78fca3c543a41f845d93e1ae
[Darwin] Suppress emitting empty ctor/dtor sections.

Older versions of GCC emit empty .constructor/.destructor sections
whenever building for C++. In fact, these sections are only used for
kernel mode code - so don't emit them unless that's what we're
building.

gcc/ChangeLog:

2019-10-12  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_file_end): Only emit empty CTOR/DTOR
sections when building kernel extension code.

From-SVN: r276923
gcc/config/darwin.c