2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / bfd / elfxx-ia64.c
index 6f0c06e0ab4c93567a8f2cdf8d5e340b8516d98a..d8c4b5761b852f1bc39a3f1a2a48b7a43287458a 100644 (file)
@@ -943,6 +943,19 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
        {
          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 at 0x%lx in section `%s'. Please use brl or indirect branch."),
+                bfd_archive_filename (sec->owner),
+                (unsigned long) roff, sec->name);
+             bfd_set_error (bfd_error_bad_value);
+             goto error_return;
+           }
+
          reladdr = (sec->output_section->vma
                     + sec->output_offset
                     + roff) & (bfd_vma) -4;
This page took 0.024961 seconds and 4 git commands to generate.