aboutsummaryrefslogtreecommitdiff
path: root/gold/mips.cc
diff options
context:
space:
mode:
authorVladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>2016-06-20 12:06:56 -0700
committerCary Coutant <ccoutant@gmail.com>2016-06-20 12:06:56 -0700
commitbeceef50438ccf2917744147a4fdadcc84db7d78 (patch)
tree3707597d789595e79199ae16c07196fbc088faf2 /gold/mips.cc
parentf5b117594fd27b73be9c1b4bb10e171883783450 (diff)
downloadgdb-beceef50438ccf2917744147a4fdadcc84db7d78.zip
gdb-beceef50438ccf2917744147a4fdadcc84db7d78.tar.gz
gdb-beceef50438ccf2917744147a4fdadcc84db7d78.tar.bz2
Add unaligned check for R_MIPS_PC16.
gold/ * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
Diffstat (limited to 'gold/mips.cc')
-rw-r--r--gold/mips.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/gold/mips.cc b/gold/mips.cc
index cea0a81..e2b7855 100644
--- a/gold/mips.cc
+++ b/gold/mips.cc
@@ -4690,6 +4690,9 @@ class Mips_relocate_functions : public Relocate_functions<size, big_endian>
else
elfcpp::Swap<32, big_endian>::writeval(wv, val);
+ if (psymval->value(object, addend) & 3)
+ return This::STATUS_PCREL_UNALIGNED;
+
return check_overflow<18>(x);
}