Objective-C, Darwin : Update metadata section uses.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 3 Oct 2020 12:40:03 +0000 (13:40 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 10 Oct 2020 16:13:21 +0000 (17:13 +0100)
commitecd616f68067cca5e7051c8872b76311b09d8f45
treeeca6b89e0cddce11c1b6e6869702a90b4de550b8
parenta788c4555c6d17a5b37516e28844e6fd6013eb3e
Objective-C, Darwin : Update metadata section uses.

Newer versions of ld64 are more picky about adherence to placement
rules for objective c metadata.  This adds protocol refs and uses
the ivar refs for all targets.

gcc/ChangeLog:

* config/darwin-sections.def (objc2_data_section): New.
(objc2_ivar_section): New.
* config/darwin.c (darwin_objc2_section): Act on Protocol and
ivar refs.

gcc/objc/ChangeLog:

* objc-next-runtime-abi-02.c
(next_runtime_abi_02_init_metadata_attributes): Make protocol
refs a distinct section.
gcc/config/darwin-sections.def
gcc/config/darwin.c
gcc/objc/objc-next-runtime-abi-02.c