This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ARM interworking with different linker sections
- From: "Eric de Jong" <ericdejong at gmx dot net>
- To: <gcc at gnu dot org>
- Date: Tue, 4 Feb 2003 11:32:06 +0100
- Subject: ARM interworking with different linker sections
Hello,
During testing arm interworking I came across the following problem:
I have the following functions in the following sections
---------------------
section .text: VMA=0x48, LMA=0x1000420, size=0xea8
contains function main() at 0x478
section .virtrom: 0x12fc, LMA=0x10016e4, size=0xe8
contains function SetLeds(unsigned char) at 0x1294
and LedLoop_rom_thumb(void) at 0x1314
(sections .data and .bss are located between .text and .virtrom)
---------------------
Function main (arm function) calls LedLoop_rom_thumb (thumb function) which
calls SetLeds (arm function)
Calling LedLoop_rom_thumb works well, the interworking stub
LedLoop_rom_thumb_from_arm is called at 0xee4 which calls LedLoop_rom_thumb at
0x1315 (0x1314 with thumb mode bit). However the call to SetLeds is translated
in a call to 0x2128. At this location there is no code or data present.
arm-objdump -S a.out reveils that the stub SetLeds_from_thumb is located at
0xedc.
When I move LedLoop_rom to segment .text all works well.
When I move LedLoop_rom and SetLeds to segment .text all works well too.
Who can help?
Eric
--------------
Eric de Jong
The Netherlands