summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-03-18 23:14:35 +0000
committerJakub Jelinek <jakub@redhat.com>2003-03-18 23:14:35 +0000
commit8b1f9a4ea65b202a110c277f09e29532dde736a3 (patch)
treecec9604052c09f5ebfd834804d353ee17dd72219 /bfd
parentbdf541ed0f733032282081da9a9e391a968c81db (diff)
downloadgdb-8b1f9a4ea65b202a110c277f09e29532dde736a3.tar.gz
* elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
againt mergeable sections. Take r_addend into account when caching trampolines.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elfxx-ia64.c14
2 files changed, 16 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a8424cbf97b..dfbdf92f1cd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
+ againt mergeable sections. Take r_addend into account when caching
+ trampolines.
+
2003-03-18 Richard Henderson <rth@redhat.com>
* elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 6778f038f7e..56c2819e15e 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -819,6 +819,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
tsec = ia64_info->plt_sec;
toff = dyn_i->plt2_offset;
+ BFD_ASSERT (irel->r_addend == 0);
}
/* Can't do anything else with dynamic symbols. */
@@ -837,10 +838,15 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
}
- symaddr = (tsec->output_section->vma
- + tsec->output_offset
- + toff
- + irel->r_addend);
+ if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+ toff = _bfd_merged_section_offset (abfd, &tsec,
+ elf_section_data (tsec)->sec_info,
+ toff + irel->r_addend,
+ (bfd_vma) 0);
+ else
+ toff += irel->r_addend;
+
+ symaddr = tsec->output_section->vma + tsec->output_offset + toff;
roff = irel->r_offset;