Resolves PR gas 14640 - check for weak symbols before emitting relocation
http://sourceware.org/bugzilla/show_bug.cgi?id=14640
Based on original patch by Vasanth Asokan in Xilinx, resolves situation
where gas will generate a jump based on a weak definition, which then
potentially falls outside the jump range if overridden by a strong
definition.
Resultant error resembled;
relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol
`test_start' defined in .testsection section in reloc_strongsym.o
Add microblaze to gas/testsuite, and include a reloc.exp test for
this bug.
binutils/gas/Changelog
2012-10-24 David Holsgrove <david.holsgrove@xilinx.com>
* config/tc-microblaze.c: Check for weak symbols before
emitting relocation.
binutils/gas/testsuite/Changelog
2012-10-24 David Holsgrove <david.holsgrove@xilinx.com>
* testsuite/gas/microblaze: New.
* testsuite/gas/microblaze/reloc_sym.exp: Add test case.
* testsuite/gas/microblaze/reloc_strongsym.s: Likewise.
* testsuite/gas/microblaze/reloc_weaksym.s: Likewise.
* testsuite/gas/microblaze/reloc_sym.d: Likewise.