[linker] relaxation question
M R Swami Reddy
MR.Swami.Reddy@nsc.com
Thu Jul 30 09:56:00 GMT 2009
Hi Nick,
Thank you very much for your suggestion.
I will try to implement the fix for this issue in Assembler sources.
Thanks
Swami
Nick Clifton wrote:
> Hi Swami,
>
>
>> For a simple c++ test case, .gcc_except_table section created. But this
>> section has references (ie label refs) from main (ie code section).
>>
>> During the linker relax, CODE section will be relaxed, due to this
>> references in the .gcc_except_table affected with wrong address after relax.
>>
>> Is this known issue in linker?
>>
>
> Not an issue as such, but it may be a known problem when implementing
> linker relaxation.
>
> What should happen is that in the assembler the references from the
> .gcc_except_table section to symbols in the .text section are converted
> into relocations against those symbols. Then in the linker when
> relaxation is performed, (which must be before the relocations are
> resolved), any symbols which point into the .text section must be
> adjusted as the section is relaxed. That way when the relocations are
> eventually resolved in the .gcc_except_table section they will get the
> correct values.
>
> Cheers
> Nick
>
>
>
>
>
More information about the Binutils
mailing list