Add unaligned check for R_MIPS_PC16.

gold/
        * mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
This commit is contained in:
Vladimir Radosavljevic 2016-06-20 12:06:56 -07:00 committed by Cary Coutant
parent f5b117594f
commit beceef5043
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
* mips.cc (Mips_relocate_functions::relpc16): Add unaligned check.
2016-06-20 Vladimir Radosavljevic <Vladimir.Radosavljevic@imgtec.com>
* mips.cc (relocation_needs_la25_stub): Add support for relocs:

View File

@ -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);
}