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]

HP-UX IA64 patch for section usage.


I'd love to give a good explanation for this patch but the person who
made it has left and all I really know is that I need it for C++ to work
on IA64 HP-UX.  Without this change, using the HP linker I get a lot of
messages like:

	ld: Invalid dynamic relocation needed for read-only section, in finput file /var/tmp//ccLCTeOg.o, for symbol vtable for __cxxabiv1::__vmi_class_type_infoat offset 0

I am hoping someone with a better understanding of linkers and data
sections can look at it and understand why it is needed and approve
the patch.

Here is the change that fixes my C++ test failures:


2002-10-29  Steve Ellcey  <sje@cup.hp.com>

	* varasm.c (categorize_decl_for_section): Handle reloc section.


*** gcc.orig/gcc/varasm.c	Tue Oct 29 12:47:24 2002
--- gcc/gcc/varasm.c	Tue Oct 29 12:48:26 2002
*************** categorize_decl_for_section (decl, reloc
*** 5060,5065 ****
--- 5060,5067 ----
  	ret = SECCAT_DATA_REL_RO;
        else if (shlib && reloc)
  	ret = SECCAT_DATA_REL_RO_LOCAL;
+       else if (reloc)
+ 	ret = SECCAT_DATA_REL;
        else if (flag_merge_constants < 2)
  	/* C and C++ don't allow different variables to share the same
  	   location.  -fmerge-all-constants allows even that (at the


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