Hi Aaron,
- 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 ?
- 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 ?
- when i remove code that accesses .VhaInit, Interworking code is
correct.
- when i disable -ffunction-sections, -fdata-sections, and
-gc-sections, and when i still access data in .VhaInit from .text,
Interworking is correct.
so, what's going on? 8-)
i think its a bug in GNU LD.
any help will be gratefully accepted.
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.
Cheers
Nick