]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin: Make metadata symbol lables linker-visible for GNU objc.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 30 Sep 2023 16:15:16 +0000 (17:15 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Fri, 19 Apr 2024 13:12:28 +0000 (14:12 +0100)
Now we have shifted to using the same relocation mechanism as clang for
objective-c typeinfo the static linker needs to have a linker-visible
symbol for metadata names (this is only needed for GNU objective C, for
NeXT the names are in separate sections).

gcc/ChangeLog:

* config/darwin.h
(darwin_label_is_anonymous_local_objc_name): Make metadata names
linker-visibile for GNU objective C.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
(cherry picked from commit 2ae00adb326ed050bd67a67656b20a2cfe789626)

gcc/config/darwin.h

index 7026d200d591fca3bab1e0821f60a69ea73ebcae..acfd4d402c66f85d990c02f0da576b271c98879d 100644 (file)
@@ -853,7 +853,7 @@ int darwin_label_is_anonymous_local_objc_name (const char *name);
        else if (xname[0] == '+' || xname[0] == '-')                         \
          fprintf (FILE, "\"%s\"", xname);                                   \
        else if (darwin_label_is_anonymous_local_objc_name (xname))          \
-         fprintf (FILE, "L%s", xname);                                      \
+       fprintf (FILE, "%c%s", flag_next_runtime ? 'L' : 'l', xname);        \
        else if (xname[0] != '"' && name_needs_quotes (xname))               \
         asm_fprintf (FILE, "\"%U%s\"", xname);                              \
        else                                                                 \