Output Section With Split Address Range

71 Views Asked by At

On an RL78 there is a section of flash (0x2000) that is mirrored into the RAM address space (0xF2000). Jump tables must be in the mirrored code space. This is all so that it can use near pointers instead of far pointers.

The problem is that .text just got large enough to push .rodata out of the mirrored memory. Also, there isn't enough flash past .rodata to put all of .text.

Is there some way to make it so that .text is split into these ranges:

  • 0x00000-0x01FFF - place .text here
  • 0x02000-0x0???? - place .rodata here
  • 0x0????-0x0FFFF - place .text here

Yes, there is an ability to create two output sections and individually place symbols in them. This does not scale well, so it isn't really a viable solution.

Is there a way to have the linker split the .text section like this?

0

There are 0 best solutions below