MIPS/GAS: Fix null pointer dereferences in R6 PC-relative relocation checks
authorMaciej W. Rozycki <macro@imgtec.com>
Tue, 21 Jun 2016 19:12:00 +0000 (20:12 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Tue, 21 Jun 2016 22:00:01 +0000 (23:00 +0100)
commit717ba204e06d88ed68441e236da3688a92cf054c
tree6bfeb73efc1891684acba3d24cf8e33726e0e596
parent51f6035b9ec8b4a23d73bed6688804e5f595e1c2
MIPS/GAS: Fix null pointer dereferences in R6 PC-relative relocation checks

Avoid segmentation faults in alignment checks made in `md_apply_fix' for
BFD_RELOC_MIPS_18_PCREL_S3 and BFD_RELOC_MIPS_19_PCREL_S2 relocations
caused by dereferencing `fixP->fx_addsy' which will be null if the
relocation processed has been fully resolved.

gas/
* config/tc-mips.c (md_apply_fix) <BFD_RELOC_MIPS_18_PCREL_S3>
<BFD_RELOC_MIPS_19_PCREL_S2>: Avoid null pointer dereferences
via `fixP->fx_addsy'.
gas/ChangeLog
gas/config/tc-mips.c