[MIPS] When calculating a relocation using an undefined weak symbol don't check for...
authorAndrew Bennett <andrew.bennett@imgtec.com>
Thu, 20 Nov 2014 15:40:16 +0000 (15:40 +0000)
committerAndrew Bennett <andrew.bennett@imgtec.com>
Tue, 2 Dec 2014 13:27:36 +0000 (13:27 +0000)
commit538baf8b7e6d17a490f126f8565638469da70204
treef745305eacbe1920bebcd9803dbc50016da037fc
parent51aecdc5320d1707e1f034f05a378e60aae71d18
[MIPS] When calculating a relocation using an undefined weak symbol don't check for overflow.

In MIPS the relocation calculation only ignores the overflow checks for undefined
weak symbols on relocations associated with j/jal.   This patch extends this to
the relocations used by the: b* instructions; pc/gp relative symbol offsets; and the
lwpc/ldpc MIPS r6 instructions.

bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Only check for overflow
on non-weak undefined symbols.

ld/testsuite/
* ld-mips-elf/mips-elf.exp: Add in undefined weak overflow tests for
o32, n32 and n64.
* ld-mips-elf/undefweak-overflow.s: New test.
* ld-mips-elf/undefweak-overflow.d: New test.
* ld-mips-elf/undefweak-overflow-n32.d: New test.
* ld-mips-elf/undefweak-overflow-n64.d: New test.
bfd/ChangeLog
bfd/elfxx-mips.c
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf.exp
ld/testsuite/ld-mips-elf/undefweak-overflow-n32.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/undefweak-overflow-n64.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/undefweak-overflow.d [new file with mode: 0644]
ld/testsuite/ld-mips-elf/undefweak-overflow.s [new file with mode: 0644]
This page took 0.024834 seconds and 4 git commands to generate.