This is the mail archive of the gcc@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]

Re: PATCH: Fix invalid loader fixups from shared libobjc withhpux10.20


Before I was just about sending in this patch noticed while working on
Linux/mips, I found this thread:

http://gcc.gnu.org/ml/gcc-patches/2001-06/msg01101.html

I think __hpux__ should be removed. On Linux/x86, I got

# objdump --sym libobjc.so.1 | grep __objc_class_name_Object
0000000000013778 g       .ctors 0000000000000000 __objc_class_name_Object

It cannot be right to have __objc_class_name_Object in the .ctors
section.



H.J.
----
2001-06-15  H.J. Lu <hjl@gnu.org>

	* objc/objc-act.c (handle_impent): Put the class name and
	category labels in read-only data section.

--- gcc/objc/objc-act.c.objc	Fri Jun 15 23:11:00 2001
+++ gcc/objc/objc-act.c	Fri Jun 15 23:11:12 2001
@@ -8456,6 +8456,8 @@ handle_impent (impent)
 	{
 	  sprintf (string, "%sobjc_class_name_%s",
 		   (flag_next_runtime ? "." : "__"), class_name);
+	  /* Put the class name label in read-only data section.  */
+	  readonly_data_section ();
 	  assemble_global (string);
 	  assemble_label (string);
 	}
@@ -8490,6 +8492,8 @@ handle_impent (impent)
 	  sprintf (string, "%sobjc_category_name_%s_%s",
 		   (flag_next_runtime ? "." : "__"),
 		   class_name, class_super_name);
+	  /* Put the class category label in read-only data section.  */
+	  readonly_data_section ();
 	  assemble_global (string);
 	  assemble_label (string);
 	}


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