summaryrefslogtreecommitdiffstats
path: root/bfd/elfxx-ia64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2004-07-09 19:27:15 +0000
committerH.J. Lu <hjl.tools@gmail.com>2004-07-09 19:27:15 +0000
commite525914fa74e7f8b6abc0d2103b27555e30dcc8f (patch)
tree2e21116ee16d56982f523e49fd4d6cac78590e23 /bfd/elfxx-ia64.c
parent4644b6e36c26302c92b1fdc51be2ef95ce5efd3e (diff)
downloadppe42-binutils-e525914fa74e7f8b6abc0d2103b27555e30dcc8f.tar.gz
ppe42-binutils-e525914fa74e7f8b6abc0d2103b27555e30dcc8f.zip
2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
PR 240 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in .init/.fini sections when trying to relax it.
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r--bfd/elfxx-ia64.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 37b0d24ade..74fbfbad88 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -943,19 +943,6 @@ 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;
@@ -984,6 +971,19 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
else if (r_type == R_IA64_PCREL60B)
continue;
+ /* 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;
+ }
+
/* If the branch and target are in the same section, you've
got one honking big section and we can't help you. You'll
get an error message later. */
OpenPOWER on IntegriCloud