[Patch, microblaze, gas] Don't emit reloc for weak symbols

Michael Eager eager@eagerm.com
Wed Oct 31 15:28:00 GMT 2012


On 10/24/2012 08:07 AM, Michael Eager wrote:
> On 10/24/2012 06:23 AM, David Holsgrove wrote:
>> 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.
>
> OK.  I'll check this in.

Checked in.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077




More information about the Binutils mailing list