summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-07-27 16:04:40 +0200
committerNikola Veljkovic <Nikola.Veljkovic@imgtec.com>2015-07-27 16:14:50 +0200
commit7e80b87f7ff08c7c13f38d76a953b0cd753403aa (patch)
treeffcd1fe83c4f05861a47b6eb14b3d80436d4fe94 /binutils-2.25/bfd
parent5b0b7aca66a30692402df9a9909ebbad7acac259 (diff)
downloadtoolchain_binutils-7e80b87f7ff08c7c13f38d76a953b0cd753403aa.zip
toolchain_binutils-7e80b87f7ff08c7c13f38d76a953b0cd753403aa.tar.gz
toolchain_binutils-7e80b87f7ff08c7c13f38d76a953b0cd753403aa.tar.bz2
Fix DT_MIPS_RLD_MAP_REL tag for n64 target and 32-bit host.
Cherry-picked from upstream: d5cff5df74b18e1e5ed94de8f4c9adee3ffd95c6 For the case of MIPS n64 target and 32-bit host, the computation of the DT_MIPS_RLD_MAP_REL tag involves sdyn->output_section->vma + sdyn->output_offset (64-bit) being added to b (32-bit host pointer), so losing the high part and resulting in an incorrect DT_MIPS_RLD_MAP_REL tag, and all dynamically linked glibc tests failing for n64. This patch fixes this (spot-tested with glibc tests; however, I don't have a self-contained testcase for this bug). * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections) <DT_MIPS_RLD_MAP_REL>: Add target address to host address difference, not to host pointer. Change-Id: If4984d632723a36a3d6c739a96706b5636f975bc
Diffstat (limited to 'binutils-2.25/bfd')
-rw-r--r--binutils-2.25/bfd/ChangeLog6
-rw-r--r--binutils-2.25/bfd/elfxx-mips.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils-2.25/bfd/ChangeLog b/binutils-2.25/bfd/ChangeLog
index f5ee80c..458b0b1 100644
--- a/binutils-2.25/bfd/ChangeLog
+++ b/binutils-2.25/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-23 Joseph Myers <joseph@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
+ <DT_MIPS_RLD_MAP_REL>: Add target address to host address
+ difference, not to host pointer.
+
2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
* elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only
diff --git a/binutils-2.25/bfd/elfxx-mips.c b/binutils-2.25/bfd/elfxx-mips.c
index 200dae8..cb6fd21 100644
--- a/binutils-2.25/bfd/elfxx-mips.c
+++ b/binutils-2.25/bfd/elfxx-mips.c
@@ -11519,7 +11519,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
s = h->root.u.def.section;
dt_addr = (sdyn->output_section->vma + sdyn->output_offset
- + b - sdyn->contents);
+ + (b - sdyn->contents));
rld_addr = (s->output_section->vma + s->output_offset
+ h->root.u.def.value);
dyn.d_un.d_ptr = rld_addr - dt_addr;