This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Attachment: 0001-PR-gas-14640-config-tc-microblaze.c-md_estimate_size.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]