GNU LD fails to generate correct ARM Thumb veneer
Aaron P. D'Souza
adsouzp@netscape.net
Mon Jul 7 22:22:00 GMT 2008
hello Nick:
thank you for your prompt response. i have seen your crt0.S.
>> - the first file to be linked is an ARM assembly .s file
>> that contains the ARM vector table and handler addresses.
>> the vector table is in a separate section called .VhaInit.
>
> Did you know that you can use the KEEP directive in a linker script (or
> a linker script fragment) in order to make sure that the .VhaInit
> section is not garbage collected ?
yes. i avoided using a linker script. i use objcopy and move the
LMA as needed for ROM programs.
>> - when i add code to access .VhaInit entries from .text to prevent the
>> garbage collection of .VhaInit, Thumb Interworking code is ZERO. the
>> entries are present, but no interworking code is present.
>
> What sort of code are you adding and how are you adding it ?
.section .VhaInit, "a"
.align 0
AppTextVha:
@ V: ARM Vectors
ResetVec: LDR PC, ResetAddr @ Reset
[...]
@ HA: our Handler Addresses
ResetAddr: .word ResetHandler @ Reset
[...]
AppTextVStart:
@ UH: our Unused Handlers
ResetHolder: B . @ Reset
LDR R1, =AppTextVha
LDR R1, =AppTextVStart
>> - when i remove code that accesses .VhaInit, Interworking code is
>> correct.
> You try to isolate whether this really is a linker bug. (It
> certainly sounds like it is). If you can reproduce the problem
> just using assembler source files then please file a bug report
> with the binutils project (at http://sourceware.org/bugzilla).
> Including a *small* test case will really help.
okay. i will send you one.
thank you once again,
Aaron
--
{tel: +91-20-6526-7076; cell: +91-9970-591-079; fax: +1-800-450-5419}
More information about the Gcc
mailing list