GNU linker: How to place .vector section inside .text

1

For backward compatibility (and other) reasons, the exception table is required to be at the same flash address as the older generation hardware. The problem is that flash on the newer hardware (also for compatibility reasons) was expanded upwards (i.e, additional flash bank was placed before existing flash, not after, to form one contiguous flash segment) This means flash now starts at a lower address than before, and the exception table must be located at the older flash start address.

For example, older flash start = 0x10040000, size = 0x40000. Newer flash start = 0x10000000, size = 0x80000. The exception table must be maintained at old flash start, 0x10040000.

To do this, the .vector section must be inserted inside the .text section at address 0x10040000. Can this be done via the linker script without creating two .text sections?

Thanks

linker
gnu
ld
linker-scripts
asked on Stack Overflow May 4, 2020 by Max

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0