diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2004-06-30 03:51:25 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2004-06-30 03:51:25 +0000 |
commit | e7f0a167643f8b3bc72321be3656fa8e35f9e4e6 (patch) | |
tree | a376de7cf96ae997b86690be1fd445b5d11bb5b9 /bfd/elfxx-ia64.c | |
parent | 2a79e10f2b06049910f33b685e98b614ba2463f8 (diff) | |
download | gdb-e7f0a167643f8b3bc72321be3656fa8e35f9e4e6.zip gdb-e7f0a167643f8b3bc72321be3656fa8e35f9e4e6.tar.gz gdb-e7f0a167643f8b3bc72321be3656fa8e35f9e4e6.tar.bz2 |
2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
PR 240
* elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
in .init/.fini sections.
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r-- | bfd/elfxx-ia64.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 6f0c06e..d8c4b57 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -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; |