john_c_kennedy
Active member
I'm using MCUXpresso for Teensy 4.1 so you guys might not be able to help with this question. But I'm modifying the linker script to link part of the code to run in ITCM RAM and I get an error with the .ARM.exidx section which is located in FLASH:
- There is a separate .ARM.exidx section created by the compiler which contains entries that refer to addresses in the code. I understand this is an ARM requirement?
- Each entry in .ARM.exidx contains a 31 bit signed integer to express the offset where the code resides. One bit is used for other purposes (to indicate the type of the entry). So the maximum offset that can be stored in an entry is 0x3FFF_FFFF.
- There is exactly one .ARM.exidx section in an image.
- The .ARM.exidx section is used for C++ exception handling but also for C code. Using compiler option -fno-exceptions does not solve the problem.
If parts of the code are placed in ITCM (which is the whole purpose of ITCM) then the following problem occurs:
ITCM address: 0x0000_0000, FLASH address: 0x6000_0000 Offset: 0x6000_0000
The linker produces a relocation error indicating the offset is to great to fit in the .ARM.exidx entry.
If parts of the code are placed in RAM at address 0x2020_0000 then no problem the offset is within range.
How does Teensyduino get around this problem, although I don't see the .arm.exidx section explicitly listed in the Teensy4.1 linker script?
Thanks, John
- There is a separate .ARM.exidx section created by the compiler which contains entries that refer to addresses in the code. I understand this is an ARM requirement?
- Each entry in .ARM.exidx contains a 31 bit signed integer to express the offset where the code resides. One bit is used for other purposes (to indicate the type of the entry). So the maximum offset that can be stored in an entry is 0x3FFF_FFFF.
- There is exactly one .ARM.exidx section in an image.
- The .ARM.exidx section is used for C++ exception handling but also for C code. Using compiler option -fno-exceptions does not solve the problem.
If parts of the code are placed in ITCM (which is the whole purpose of ITCM) then the following problem occurs:
ITCM address: 0x0000_0000, FLASH address: 0x6000_0000 Offset: 0x6000_0000
The linker produces a relocation error indicating the offset is to great to fit in the .ARM.exidx entry.
If parts of the code are placed in RAM at address 0x2020_0000 then no problem the offset is within range.
How does Teensyduino get around this problem, although I don't see the .arm.exidx section explicitly listed in the Teensy4.1 linker script?
Thanks, John