]> git.ipfire.org Git - thirdparty/gcc.git/commit
Darwin: Partial reversion of r14-3648 (Inits Section).
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 10 Sep 2023 13:48:42 +0000 (14:48 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 10 Sep 2023 13:48:42 +0000 (14:48 +0100)
commit5b33b364652866165431aef1810af1e890229c5e
treece2b5f4361a791fc31c60503d482109985ebc0ac
parent0d50facd937bda26e3083046dc5dec8fca47e1e6
Darwin: Partial reversion of r14-3648 (Inits Section).

Although the Darwin ABI places both hot and cold partitions in the same
section (the linker can partition by name), this does not work with the
current dwarf2out implementation.

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.

TODO: figure out a way to allow us to match the ABI fully.

gcc/ChangeLog:

* config/darwin.cc (darwin_function_section): Place unlikely
executed global init code into the standard cold section.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/config/darwin.cc