2004-06-29 H.J. Lu PR 240 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch in .init/.fini sections. --- bfd/elfxx-ia64.c.brl 2004-06-29 14:41:42.833932627 -0700 +++ bfd/elfxx-ia64.c 2004-06-29 18:10:44.212915584 -0700 @@ -953,6 +953,19 @@ 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 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;