This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

PATCH: IA64: Don't relax branch in .init/.fini sections.


On Sat, Jun 26, 2004 at 05:48:11PM -0700, H. J. Lu wrote:
> See
> 
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=240
> 

Here is a patch.


H.J.
----
2004-06-26  H.J. Lu  <hongjiu.lu@intel.com>

	* elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
	in .init/.fini sections.

--- bfd/elfxx-ia64.c.brl	2004-06-24 08:49:54.000000000 -0700
+++ bfd/elfxx-ia64.c	2004-06-26 21:50:27.637103414 -0700
@@ -953,6 +953,18 @@ elfNN_ia64_relax_section (abfd, sec, lin
 	{
 	  bfd_signed_vma offset;
 
+	  /* We can't put a trampoline in a .init/.fini section. Issue
+	     an error.  */
+	  if (strcmp (sec->output_section->name, ".init") == 0
+	      || strcmp (sec->output_section->name, ".fini") == 0)
+	    {
+	      (*_bfd_error_handler)
+		(_("%s: Can't relax br in section `%s'. Please use brl."),
+		 bfd_archive_filename (sec->owner), sec->name);
+	      bfd_set_error (bfd_error_bad_value);
+	      goto error_return;
+	    }
+
 	  reladdr = (sec->output_section->vma
 		     + sec->output_offset
 		     + roff) & (bfd_vma) -4;


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