[Xtensa Patch] Fixup the bits during a relocatable link

Sterling Augustine sterling@tensilica.com
Fri May 28 18:17:00 GMT 2010


The Xtensa version of ld does extensive link-time relaxation.  Until 
now, when it modified a section, it would only change the relevant 
relocations, but not actual bits in the relevant instructions. Normally 
a final link would do that part of the work.

However, linux-kernel loadable modules never go through final links, so 
linker-relaxation didn't work with kernel loadable modules because the 
instructions were stale vs the relocations describing them.

I have committed the attached patch which fixes this problem. It is now 
possible to use linker relaxation on kernel loadable modules for Xtensa.

Sterling
sterling@tensilica.com

2010-05-28  Sterling Augustine  <sterling@tensilica.com>

         * elf32-xtensa.c (elf_xtensa_relocate_section): Add a
	large amount of code to change the bits in the
         instructions to match the changes in the relocations.
	Declare dest_addr and sym_sec to help.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-bits-patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20100528/46787504/attachment.ksh>


More information about the Binutils mailing list