This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

objc and user_label_prefix


The objc testsuite fails most of the tests for arm/netbsd because the
compiler cannot decide if it should add the user_label_prefix or not to
__objc_class_name_XXX. This used to work, but was changed in the cleanup

   2001-06-27  Stan Shebs  <shebs@apple.com>
           * objc/objc-act.c (handle_impent): Rewrite to be more portable
           and to use ASM_DECLARE_CLASS_REFERENCE.

The patch below corrects the construction of the label names.


Bootstrapped and tested on arm-unknown-netbsd1.5Y.

   /Krister



2002-01-02  Krister Walfridsson  <cato@df.lth.se>

	* objc/objc-act.c (handle_impent): Remove '*' from label names.



Index: gcc/gcc/objc/objc-act.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/objc-act.c,v
retrieving revision 1.120
diff -c -3 -p -r1.120 objc-act.c
*** objc-act.c	2001/12/29 16:16:51	1.120
--- objc-act.c	2002/01/02 22:33:58
***************
*** 1,5 ****
  /* Implement classes and message passing for Objective C.
!    Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001
     Free Software Foundation, Inc.
     Contributed by Steve Naroff.

--- 1,5 ----
  /* Implement classes and message passing for Objective C.
!    Copyright (C) 1992, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
     Free Software Foundation, Inc.
     Contributed by Steve Naroff.

*************** handle_impent (impent)
*** 8325,8331 ****

        string = (char *) alloca (strlen (class_name) + 30);

!       sprintf (string, "*%sobjc_class_name_%s",
                 (flag_next_runtime ? "." : "__"), class_name);
      }
    else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE)
--- 8325,8331 ----

        string = (char *) alloca (strlen (class_name) + 30);

!       sprintf (string, "%sobjc_class_name_%s",
                 (flag_next_runtime ? "." : "__"), class_name);
      }
    else if (TREE_CODE (impent->imp_context) == CATEGORY_IMPLEMENTATION_TYPE)
*************** handle_impent (impent)
*** 8341,8347 ****
        /* Do the same for categories.  Even though no references to
           these symbols are generated automatically by the compiler, it
           gives you a handle to pull them into an archive by hand.  */
!       sprintf (string, "*%sobjc_category_name_%s_%s",
                 (flag_next_runtime ? "." : "__"), class_name, class_super_name);
      }
    else
--- 8341,8347 ----
        /* Do the same for categories.  Even though no references to
           these symbols are generated automatically by the compiler, it
           gives you a handle to pull them into an archive by hand.  */
!       sprintf (string, "%sobjc_category_name_%s_%s",
                 (flag_next_runtime ? "." : "__"), class_name, class_super_name);
      }
    else


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]