From: Iain Sandoe Date: Sat, 30 Sep 2023 16:15:16 +0000 (+0100) Subject: Darwin: Make metadata symbol lables linker-visible for GNU objc. X-Git-Tag: releases/gcc-11.5.0~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=441effdb320d4939a1d09246ba1370d733c3218a;p=thirdparty%2Fgcc.git Darwin: Make metadata symbol lables linker-visible for GNU objc. 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 seaprate 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 (cherry picked from commit 24709788e40bc26dfb49585e752fad503fdced71) --- diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index ef598f10c90b..2dfdf8546e6b 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -839,7 +839,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 \