diff mbox

darwin fix for gcc-5 (RM please)

Message ID 80F77357-B26B-4E02-8042-43F9039E8FCE@comcast.net
State New
Headers show

Commit Message

Mike Stump July 8, 2015, 4:37 p.m. UTC
I’d like to merge in the fix from https://gcc.gnu.org/PR66523 into the gcc-5-branch.

RM Ok?

https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773:

Comments

Richard Biener July 9, 2015, 8:18 a.m. UTC | #1
On Wed, Jul 8, 2015 at 6:37 PM, Mike Stump <mikestump@comcast.net> wrote:
> I’d like to merge in the fix from https://gcc.gnu.org/PR66523 into the gcc-5-branch.
>
> RM Ok?

Ok.

Richard.

> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35773:
> diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
> index 40804b8..0080299 100644
> --- a/gcc/config/darwin.c
> +++ b/gcc/config/darwin.c
> @@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
>  void
>  darwin_mark_decl_preserved (const char *name)
>  {
> +  /* Actually we shouldn't mark any local symbol this way, but for now
> +     this only happens with ObjC meta-data.  */
> +  if (darwin_label_is_anonymous_local_objc_name (name))
> +    return;
> +
>    fprintf (asm_out_file, "\t.no_dead_strip ");
>    assemble_name (asm_out_file, name);
>    fputc ('\n', asm_out_file);
>
diff mbox

Patch

diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 40804b8..0080299 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1259,6 +1259,11 @@  darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
 void
 darwin_mark_decl_preserved (const char *name)
 {
+  /* Actually we shouldn't mark any local symbol this way, but for now
+     this only happens with ObjC meta-data.  */
+  if (darwin_label_is_anonymous_local_objc_name (name))
+    return;
+
   fprintf (asm_out_file, "\t.no_dead_strip ");
   assemble_name (asm_out_file, name);
   fputc ('\n', asm_out_file);