Darwin: Place global inits in the correct section.
This handles placement of global initializers into __TEXT,__StaticInit as used
by other platform toolchains.
Since we do see global initialization code getting hot/cold splits, this
patch places the cold parts into text_cold, and keeps the hot part in
the correct Init section per ABI.
This includes the update from
5b33b364652866165431aef1810af1e890229c5e.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/ChangeLog:
* config/darwin-sections.def (static_init_section): Add the
__TEXT,__StaticInit section.
* config/darwin.cc (darwin_function_section): Use the static init
section for global initializers, to match other platform toolchains.
Place unlikely executed global init code into the standard cold
section.
(cherry picked from commit
68dc3e94fd6bd395a8b343533485616dff3fc796)