The AVR-Dx family support mapping some of flash into CPU data space, so it can be accessed like RAM using the LD instruction instead of LPM. In the AVR128DB datasheet this is discussed in section 11.3.2.
This sounds great, but is there any compiler support for this? When I declare a constant array using the __flash keyword, the compiler still generates code using LPM to load the data, so it's not taking advantage of this feature. I'm looking for some kind of __mapped_flash attribute that will put constant data into a region of flash that's mapped to CPU data space, and then automatically use LD with the correctly calculated address to load the data. I could probably accomplish the same thing myself by playing with linker settings and some address remapping macros, but I don't want to reinvent the wheel.