Reordering how the compiler sets up Flash Mem

In the project I am working on, I am placing a lot of data in PROGMEM.

All of the data arrays I am using are smaller than 31k bytes to comply with the 32765 byte limit.

The processor I am using is a Mega 2560 which has 256k of available Flash ROM.

To-date, I have been able to get the compiler to load and compile programs as large as 108k. That is not say that they actually run. They will run if I keep the total program size down to about 65k.

In reviewing the problem I have found several posts concerning the problem and some very complicated fixes.

One of the problems that was discussed was that the compiler currently loads the program in the following order according to avr6.x: "TEXT", data, eeprom, fuse, lock and signature.

// Taken from avr6.x
MEMORY
{
  text   (rx)   : ORIGIN = 0, LENGTH = 1024K
  data   (rw!x) : ORIGIN = 0x800200, LENGTH = 0xfe00 //65,024 bytes
  eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K
  fuse      (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
  lock      (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
  signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
}

When you are using a lot of PROGMEM. it is not long before the program functions are pushed above 64k and this causes problems as most libraries are not designed to operate above 64k and even Arduino 's I/O hardware will not work correctly above 65k.

A couple of years (2013) ago, a commenter using the handle "Pyro65" and several discussed this and made some suggestions.

It seems to me that it should be relatively easy to rearrange to order in which the compiler places things are placed in memory. In my very very humble opinion, Text and Data should be at the top not the bottom of the stack.

What does the number 0x820,000 represent in avf6.x?? That cannot be a memory location.

How would I go about changing the order and what kind of problems am I likely to run into??