aboutsummaryrefslogtreecommitdiff
path: root/gas/ChangeLog
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2016-06-21 18:54:16 +0100
committerMaciej W. Rozycki <macro@imgtec.com>2016-06-21 22:58:50 +0100
commit51f6035b9ec8b4a23d73bed6688804e5f595e1c2 (patch)
tree84d99f81e503ef74359b25b8d79c55a04b7dec0d /gas/ChangeLog
parent912815f079a8f3c40c0968ba5140619de079e199 (diff)
downloadgdb-51f6035b9ec8b4a23d73bed6688804e5f595e1c2.zip
gdb-51f6035b9ec8b4a23d73bed6688804e5f595e1c2.tar.gz
gdb-51f6035b9ec8b4a23d73bed6688804e5f595e1c2.tar.bz2
MIPS/GAS: Correct BFD_RELOC_MIPS_18_PCREL_S3 calculation
The PC-relative R_MIPS_PC18_S3 relocation and consequently its BFD internal BFD_RELOC_MIPS_18_PCREL_S3 representation is calculated from the address of the aligned doubleword containing the location being relocated: (sign_extend(A) + S - (P & ~0x7)) >> 3 rather than the address of the location itself. Reflect this in calculations made by GAS so that the relocated field is set correctly if resolved by GAS, such as with local symbols in the same section which do not require relocations to be propagated to the link stage. gas/ * config/tc-mips.c (md_pcrel_from) <BFD_RELOC_MIPS_18_PCREL_S3>: Calculate relocation from the containing aligned doubleword. (tc_gen_reloc) <BFD_RELOC_MIPS_18_PCREL_S3>: Calculate the addend from the containing aligned doubleword.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r--gas/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1e88b21..45a5054 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2016-06-21 Maciej W. Rozycki <macro@imgtec.com>
+ * config/tc-mips.c (md_pcrel_from) <BFD_RELOC_MIPS_18_PCREL_S3>:
+ Calculate relocation from the containing aligned doubleword.
+ (tc_gen_reloc) <BFD_RELOC_MIPS_18_PCREL_S3>: Calculate the
+ addend from the containing aligned doubleword.
+
+2016-06-21 Maciej W. Rozycki <macro@imgtec.com>
+
* config/tc-mips.c (mips_force_relocation): Use `file_mips_opts'
rather than `mips_opts' for the R6 ISA check.
(mips_fix_adjustable): Likewise.