diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-03 13:40:03 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-10 17:13:21 +0100 |
commit | ecd616f68067cca5e7051c8872b76311b09d8f45 (patch) | |
tree | eca6b89e0cddce11c1b6e6869702a90b4de550b8 /gcc/config/darwin.c | |
parent | a788c4555c6d17a5b37516e28844e6fd6013eb3e (diff) | |
download | gcc-ecd616f68067cca5e7051c8872b76311b09d8f45.zip gcc-ecd616f68067cca5e7051c8872b76311b09d8f45.tar.gz gcc-ecd616f68067cca5e7051c8872b76311b09d8f45.tar.bz2 |
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.
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r-- | gcc/config/darwin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 7eb288e..e101f8e 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1460,6 +1460,9 @@ darwin_objc2_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base) else if (!strncmp (p, "G2_META", 7) || !strncmp (p, "G2_CLAS", 7)) return darwin_sections[objc2_classdefs_section]; + else if (!strncmp (p, "V2_PCOL", 7)) + return ld_uses_coal_sects ? darwin_sections[data_coal_section] + : darwin_sections[objc2_data_section]; else if (!strncmp (p, "V2_MREF", 7)) return darwin_sections[objc2_message_refs_section]; else if (!strncmp (p, "V2_CLRF", 7)) @@ -1495,6 +1498,9 @@ darwin_objc2_section (tree decl ATTRIBUTE_UNUSED, tree meta, section * base) else if (!strncmp (p, "V2_CSTR", 7)) return darwin_sections[objc2_constant_string_object_section]; + else if (!strncmp (p, "V2_IVRF", 7)) + return darwin_sections[objc2_ivar_section]; + /* Not recognized, default. */ return base; } |